build(version): bump version v0.24.0 (#203) #79
Workflow file for this run
This file contains 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: goreleaser | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' # Only build tag with semantic versioning format | |
- 'v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+' | |
permissions: | |
contents: write | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: git fetch --force --tags | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
check-latest: true | |
cache: true | |
- name: Set release tag env variable | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Set the current version as env variable | |
run: | | |
make build | |
echo "CURRENT_VERSION=$(./dblab version)" >> $GITHUB_ENV | |
- name: Test the env variables | |
run: | | |
echo RELEASE_VERSION | |
echo ${{ env.RELEASE_VERSION }} | |
echo CURRENT_VERSION | |
echo ${{ env.CURRENT_VERSION }} | |
- name: Run GoReleaser | |
if: env.RELEASE_VERSION == env.CURRENT_VERSION | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
version: latest | |
args: release -f .goreleaser.yaml --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GO_RELEASER_GITHUB_TOKEN }} |