@@ -10,99 +10,25 @@ permissions:
1010 contents : write
1111
1212jobs :
13- build :
14- name : Build and Release
13+ release :
14+ name : Release
1515 runs-on : ubuntu-latest
16-
1716 steps :
18- - name : Checkout code
17+ - name : Checkout
1918 uses : actions/checkout@v4
20-
19+ with :
20+ fetch-depth : 0
21+
2122 - name : Set up Go
2223 uses : actions/setup-go@v5
2324 with :
2425 go-version : ' 1.23'
25-
26- - name : Get version from tag
27- id : get_version
28- run : |
29- if [[ $GITHUB_REF == refs/tags/* ]]; then
30- echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
31- else
32- echo "VERSION=v0.0.0-dev" >> $GITHUB_OUTPUT
33- fi
34-
35- - name : Build for multiple platforms
36- run : |
37- # Build for Windows (amd64)
38- GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o build/pace-windows-amd64.exe cmd/pace/main.go
39-
40- # Build for Windows (arm64)
41- GOOS=windows GOARCH=arm64 go build -ldflags="-s -w" -o build/pace-windows-arm64.exe cmd/pace/main.go
42-
43- # Build for Linux (amd64)
44- GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o build/pace-linux-amd64 cmd/pace/main.go
45-
46- # Build for Linux (arm64)
47- GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -o build/pace-linux-arm64 cmd/pace/main.go
48-
49- # Build for macOS (amd64)
50- GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o build/pace-darwin-amd64 cmd/pace/main.go
51-
52- # Build for macOS (arm64 - Apple Silicon)
53- GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -o build/pace-darwin-arm64 cmd/pace/main.go
54-
55- - name : Create checksums
56- run : |
57- cd build
58- sha256sum * > checksums.txt
59- cat checksums.txt
60-
61- - name : Create Release
62- uses : softprops/action-gh-release@v1
63- if : startsWith(github.ref, 'refs/tags/')
26+
27+ - name : Run GoReleaser
28+ uses : goreleaser/goreleaser-action@v6
6429 with :
65- files : |
66- build/pace-windows-amd64.exe
67- build/pace-windows-arm64.exe
68- build/pace-linux-amd64
69- build/pace-linux-arm64
70- build/pace-darwin-amd64
71- build/pace-darwin-arm64
72- build/checksums.txt
73- draft : false
74- prerelease : false
75- generate_release_notes : true
76- body : |
77- ## Installation
78-
79- Download the appropriate binary for your platform:
80-
81- ### Windows
82- - **AMD64**: `pace-windows-amd64.exe`
83- - **ARM64**: `pace-windows-arm64.exe`
84-
85- ### Linux
86- - **AMD64**: `pace-linux-amd64`
87- - **ARM64**: `pace-linux-arm64`
88-
89- ### macOS
90- - **Intel (AMD64)**: `pace-darwin-amd64`
91- - **Apple Silicon (ARM64)**: `pace-darwin-arm64`
92-
93- ### Verify Download
94-
95- Verify the integrity of your download using the checksums in `checksums.txt`:
96-
97- ```bash
98- sha256sum -c checksums.txt --ignore-missing
99- ```
100-
101- ### Quick Start
102-
103- 1. Download the binary for your platform
104- 2. Make it executable (Linux/macOS): `chmod +x pace-*`
105- 3. Move to your PATH (optional): `mv pace-* /usr/local/bin/pace`
106- 4. Run: `pace --help`
30+ version : ' ~> v2'
31+ args : release --clean
10732 env :
10833 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34+ WINGET_GITHUB_TOKEN : ${{ secrets.WINGET_GITHUB_TOKEN }}
0 commit comments