Skip to content

Commit 137adf9

Browse files
committed
use Goreleaser
1 parent 7aa9d47 commit 137adf9

File tree

1 file changed

+6
-27
lines changed

1 file changed

+6
-27
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,10 @@ jobs:
1919
with:
2020
go-version: "1.23"
2121

22-
- name: Extract Version from Tag
23-
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
24-
25-
- name: Build Binary
26-
run: |
27-
go build -ldflags "-X main.Version=kosli-dev-${VERSION}" -o aws-vault .
28-
29-
- name: Build for Linux and MacOS (amd64)
30-
run: |
31-
# Build for Linux
32-
GOOS=linux GOARCH=amd64 go build -ldflags "-X main.Version=${VERSION}" -o aws-vault-linux-amd64 .
33-
chmod +x aws-vault-linux-amd64
34-
35-
# Build for MacOS
36-
GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.Version=${VERSION}" -o aws-vault-darwin-amd64 .
37-
chmod +x aws-vault-darwin-amd64
38-
39-
- name: Create GitHub Release
40-
uses: softprops/action-gh-release@v2
22+
- name: Run GoReleaser
23+
uses: goreleaser/goreleaser-action@v6
4124
with:
42-
files: |
43-
aws-vault-linux-amd64
44-
aws-vault-darwin-amd64
45-
tag_name: ${{ github.ref_name }}
46-
name: Release ${{ github.ref_name }}
47-
body: "Automated release of version ${{ github.ref_name }}"
48-
draft: false
49-
prerelease: false
25+
version: latest
26+
args: release --clean
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)