Repository navigation
docs: make README English-first with badges, add zh-TW translation (#8) #71
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: Auto Tag & Release | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| jobs: | |
| tag-and-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get latest tag | |
| id: latest | |
| run: | | |
| tag=$(git tag --sort=-v:refname | head -1) | |
| echo "tag=${tag:-v0.0.0}" >> "$GITHUB_OUTPUT" | |
| - name: Bump patch version | |
| id: bump | |
| run: | | |
| current="${{ steps.latest.outputs.tag }}" | |
| major=$(echo "$current" | cut -d. -f1) | |
| minor=$(echo "$current" | cut -d. -f2) | |
| patch=$(echo "$current" | cut -d. -f3) | |
| new="${major}.${minor}.$((patch + 1))" | |
| echo "tag=${new}" >> "$GITHUB_OUTPUT" | |
| - name: Create tag | |
| run: | | |
| git tag "${{ steps.bump.outputs.tag }}" | |
| git push origin "${{ steps.bump.outputs.tag }}" | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.22" | |
| - uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| version: "~> v2" | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GORELEASER_CURRENT_TAG: ${{ steps.bump.outputs.tag }} |