feat: enhance CI workflows and versioning #20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| packages: write | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Compute CalVer | |
| id: calver | |
| run: | | |
| set -euo pipefail | |
| mise run fetch-tags | |
| mise run gha-output-version | |
| - name: Release Please | |
| id: release-please | |
| uses: googleapis/release-please-action@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| target-branch: main | |
| config-file: release-please-config.json | |
| manifest-file: .release-please-manifest.json | |
| release-as: ${{ steps.calver.outputs.version }} | |
| - uses: jdx/mise-action@v3 | |
| name: Set up mise | |
| if: ${{ steps.release-please.outputs.release_created }} | |
| with: | |
| cache: true | |
| - run: mise run trust | |
| if: ${{ steps.release-please.outputs.release_created }} | |
| - name: Publish release images | |
| if: ${{ steps.release-please.outputs.release_created }} | |
| env: | |
| VERSION: ${{ steps.release-please.outputs.tag_name }} | |
| run: mise run publish |