Bumped version to 0.5.1 (#180) #43
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: | |
| workflow_dispatch: | |
| push: | |
| tags: ["v*"] | |
| permissions: | |
| contents: write | |
| jobs: | |
| check-version-file: | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Get tag version | |
| id: tag | |
| run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Get file version | |
| id: file | |
| run: echo "version=$(cat version/VERSION)" >> $GITHUB_OUTPUT | |
| - name: Compare versions | |
| run: | | |
| if [ "${{ steps.tag.outputs.version }}" != "${{ steps.file.outputs.version }}" ]; then | |
| echo "Tag version (${{ steps.tag.outputs.version }}) does not match file version (${{ steps.file.outputs.version }})" | |
| exit 1 | |
| fi | |
| echo "Version check passed: ${{ steps.tag.outputs.version }}" | |
| goreleaser: | |
| needs: check-version-file | |
| runs-on: ubuntu-latest | |
| env: | |
| flags: "" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Determine Go version | |
| id: go | |
| uses: ./.github/actions/go-version | |
| - name: Set up Go | |
| uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 | |
| with: | |
| go-version: ${{ steps.go.outputs.version }} | |
| cache: true | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0 | |
| with: | |
| distribution: goreleaser | |
| version: "~> v2" | |
| args: release --clean ${{ env.flags }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |