chore: OSS hygiene, branding, and onboarding (#222) #41
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: | |
| semantic-release: | |
| name: Semantic Release | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.semrel.outputs.version }} | |
| 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" | |
| publish-artifacts: | |
| name: Publish CLI release artifacts | |
| runs-on: ubuntu-latest | |
| needs: semantic-release | |
| if: needs.semantic-release.outputs.version != '' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.25.7" | |
| cache-dependency-path: | | |
| tools/tools.go | |
| go.mod | |
| - name: Refresh tags | |
| run: git fetch --force --tags | |
| - name: Verify release tag exists | |
| run: | | |
| test "$(git describe --tags --exact-match)" = "v${{ needs.semantic-release.outputs.version }}" | |
| - name: Publish CLI release artifacts | |
| uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| version: "~> v2" | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Release info | |
| run: | | |
| echo "Released version: ${{ needs.semantic-release.outputs.version }}" |