Skip to content

Commit 331089c

Browse files
committed
added PR goreleaser
1 parent 9e09bf3 commit 331089c

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/pr-build.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: PR Build
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
snapshot:
10+
name: Build Snapshot Packages
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Set up Go
19+
uses: actions/setup-go@v5
20+
with:
21+
go-version: '1.24'
22+
23+
- name: Run GoReleaser Snapshot
24+
uses: goreleaser/goreleaser-action@v6
25+
with:
26+
version: '~> v2'
27+
args: release --snapshot --clean
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Upload Debian Packages
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: debian-packages
35+
path: dist/*.deb
36+
retention-days: 30
37+
38+
- name: Upload RPM Packages
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: rpm-packages
42+
path: dist/*.rpm
43+
retention-days: 30
44+
45+
- name: Upload Archives
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: archives
49+
path: dist/*.tar.gz
50+
retention-days: 30

0 commit comments

Comments
 (0)