Release #159
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: | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: "Release tag (e.g. 1.0.0)" | |
| required: true | |
| type: string | |
| prerelease: | |
| description: "Create as pre-release" | |
| required: false | |
| type: boolean | |
| default: false | |
| permissions: | |
| contents: write | |
| actions: read | |
| packages: write | |
| id-token: write | |
| attestations: write | |
| artifact-metadata: write | |
| jobs: | |
| create-release: | |
| name: Create tag and release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Create and push tag | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git tag -a "${{ inputs.tag }}" -m "Release ${{ inputs.tag }}" | |
| git push origin "${{ inputs.tag }}" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| tag_name: ${{ inputs.tag }} | |
| name: ${{ inputs.tag }} | |
| prerelease: ${{ inputs.prerelease }} | |
| generate_release_notes: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| build-and-upload: | |
| name: Build and upload release assets | |
| needs: create-release | |
| uses: ./.github/workflows/build.yml | |
| with: | |
| tag: ${{ inputs.tag }} | |
| checkout_ref: refs/tags/${{ inputs.tag }} | |
| secrets: inherit |