chore: update GitHub Actions and Goreleaser configurations #3
This file contains 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: Dev Release | |
on: | |
push: | |
branches: | |
- '*' | |
paths: | |
- '**.go' | |
- 'go.mod' | |
- '.github/**' | |
env: | |
TZ: Asia/Shanghai | |
GO_VERSION: '1.22' | |
permissions: write-all | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
check-latest: true | |
- name: install task | |
run: | | |
echo "install task" | |
go install github.com/go-task/task/v3/cmd/task@latest | |
- name: install upx | |
uses: crazy-max/ghaction-upx@v3 | |
with: | |
install-only: true | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
version: latest | |
args: release -f .goreleaser.dev.yaml --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |