Skip to content

Commit f7e7ed3

Browse files
committed
chore: update workflow and goreleaser
1 parent 7838a17 commit f7e7ed3

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
name: CI
33

44
on:
5-
pull_request_target:
6-
branches:
7-
- 'main'
8-
- 'release/**'
5+
pull_request:
6+
7+
permissions:
8+
contents: write
99

1010
jobs:
1111
fmt:
@@ -60,8 +60,8 @@ jobs:
6060
uses: goreleaser/goreleaser-action@v6
6161
with:
6262
version: "~> v2"
63-
args: release --clean --skip=publish
63+
args: release --clean --skip=publish --snapshot
6464
env:
6565
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6666
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
67-
67+
BUILDVERSION: ${{ env.BUILDVERSION }}

.github/workflows/release.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ on:
1818
tags:
1919
- "v*"
2020

21+
permissions:
22+
contents: write
23+
2124
jobs:
2225
goreleaser:
2326
runs-on: ubuntu-latest
@@ -27,10 +30,6 @@ jobs:
2730
with:
2831
fetch-depth: 0
2932

30-
- name: Set BUILDVERSION env var
31-
id: buildversion
32-
run: echo "BUILDVERSION=$(git describe --tags --always)" >> $GITHUB_ENV
33-
3433
- name: Setup Go env
3534
uses: actions/setup-go@v5
3635
with:

.goreleaser.yml renamed to .goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ builds:
2828
goarch: '386'
2929
binary: '{{ .ProjectName }}_v{{ .Version }}'
3030
archives:
31-
- format: zip
31+
- formats: ["zip"]
3232
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
3333
checksum:
3434
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'

0 commit comments

Comments
 (0)