chore: release version v1.7.3 #62
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: Create release | |
| on: # yamllint disable-line rule:truthy | |
| push: | |
| branches: ["main", "master"] | |
| # Release whenever this file changes | |
| paths: | |
| - "src/gabo/cmd/gabo/version.txt" | |
| workflow_dispatch: | |
| jobs: | |
| generateTag: | |
| name: "Auto-generate Git tag whenever version.txt changes" | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: true # Required to allow git fetch | |
| fetch-depth: 0 | |
| - name: Fetch git tags | |
| run: git fetch --force --tags | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: "src/gabo/go.mod" | |
| cache: false # Disable caching to avoid cache poisoning | |
| - name: Read gabo version name | |
| id: read-version | |
| run: | | |
| echo "version=$(cat src/gabo/cmd/gabo/version.txt)" > "$GITHUB_OUTPUT" | |
| - name: Create new tag | |
| id: tag_version | |
| uses: mathieudutour/github-tag-action@a22cf08638b34d5badda920f9daf6e72c477b07b # v6.2 | |
| with: | |
| custom_tag: ${{ steps.read-version.outputs.version }} | |
| tag_prefix: "" # To prevent extra "v" in the prefix | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| releaseBinary: | |
| name: "Release Go binaries with Go Releaser" | |
| runs-on: ubuntu-latest | |
| needs: generateTag | |
| timeout-minutes: 15 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: true # Required to allow git fetch | |
| fetch-depth: 0 | |
| - name: Fetch git tags | |
| run: git fetch --force --tags | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: stable | |
| cache: false # Disable caching to avoid cache poisoning | |
| # More assembly might be required: Docker logins, GPG, etc. It all depends | |
| # on your needs. | |
| - uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0 | |
| with: | |
| distribution: goreleaser | |
| version: latest | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |