v1.0.1 #2
Workflow file for this run
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: | |
| release: | |
| types: [published] | |
| jobs: | |
| Release: | |
| runs-on: [ubuntu-24.04] | |
| permissions: | |
| contents: write # Required to create tags. | |
| id-token: write # Required for authentication. | |
| packages: write # Required to publish packages. | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| fetch-depth: 0 # Fetch tag history. | |
| persist-credentials: false | |
| - name: Tag release | |
| env: | |
| GH_TAG: ${{ github.event.release.tag_name}} | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| version=${GH_TAG%%.*} | |
| gh api /repos/${{ github.repository }}/git/refs/tags/${version} --method PATCH --silent --field sha="${GITHUB_SHA}" --field force=true || \ | |
| gh api /repos/${{ github.repository }}/git/refs --method POST --silent --field sha="${GITHUB_SHA}" --field ref="refs/tags/${version}" | |
| - name: Publish package | |
| continue-on-error: true | |
| uses: actions/publish-immutable-action@4bc8754ffc40f27910afb20287dbbbb675a4e978 # v0.0.4 |