add update command #4
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: | |
| - master | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go/go.mod | |
| - name: Set version from commit count | |
| run: echo "GORELEASER_CURRENT_TAG=v0.$(git rev-list --count HEAD)" >> $GITHUB_ENV | |
| - name: Create and push tag | |
| run: | | |
| git tag "$GORELEASER_CURRENT_TAG" | |
| git push origin "$GORELEASER_CURRENT_TAG" | |
| - uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| version: latest | |
| args: release --clean | |
| workdir: go | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |