chore(release): unify sdlc flow and cli publish #33
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 | |
| concurrency: | |
| group: release-${{ github.ref }} | |
| cancel-in-progress: false | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| name: Semantic Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: go-semantic-release/action@v1 | |
| id: semrel | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| allow-initial-development-versions: true | |
| changelog-generator-opt: "emojis=true" | |
| - name: Set up Go | |
| if: steps.semrel.outputs.version != '' | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.25.7" | |
| cache-dependency-path: | | |
| tools/tools.go | |
| go.mod | |
| - name: Refresh tags | |
| if: steps.semrel.outputs.version != '' | |
| run: git fetch --force --tags | |
| - name: Publish CLI release artifacts | |
| if: steps.semrel.outputs.version != '' | |
| uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| version: "~> v2" | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Release info | |
| if: steps.semrel.outputs.version != '' | |
| run: | | |
| echo "Released version: ${{ steps.semrel.outputs.version }}" |