Skip to content

Commit 1a38b89

Browse files
committed
ci: Setup automatic release on platforms
1 parent 9fbc436 commit 1a38b89

22 files changed

Lines changed: 142 additions & 112 deletions

.github/workflows/release.yml

Lines changed: 12 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -10,99 +10,25 @@ permissions:
1010
contents: write
1111

1212
jobs:
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 }}

.goreleaser.yaml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
version: 2
2+
3+
project_name: pace
4+
5+
builds:
6+
- main: ./cmd/pace
7+
binary: pace
8+
ldflags:
9+
- -s -w
10+
goos:
11+
- windows
12+
- linux
13+
- darwin
14+
goarch:
15+
- amd64
16+
- arm64
17+
18+
archives:
19+
- format: tar.gz
20+
format_overrides:
21+
- goos: windows
22+
format: zip
23+
name_template: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}"
24+
25+
checksum:
26+
name_template: "checksums.txt"
27+
28+
changelog:
29+
use: github-native
30+
31+
release:
32+
github:
33+
owner: azuyamat
34+
name: pace
35+
draft: false
36+
prerelease: auto
37+
38+
snapcrafts:
39+
- name: pace
40+
summary: Task runner and build orchestration tool
41+
description: |
42+
Pace is a task runner that allows you to define, manage, and execute
43+
tasks with dependencies, hooks, caching, and file watching.
44+
grade: stable
45+
confinement: classic
46+
license: MIT
47+
publish: true
48+
49+
nfpms:
50+
- package_name: pace
51+
homepage: https://github.com/azuyamat/pace
52+
description: Task runner and build orchestration tool
53+
maintainer: Azuyamat <blaneyderek@gmail.com>
54+
license: MIT
55+
formats:
56+
- deb
57+
58+
winget:
59+
- name: pace
60+
publisher: Azuyamat
61+
short_description: Task runner and build orchestration tool
62+
license: MIT
63+
publisher_url: https://github.com/azuyamat
64+
publisher_support_url: https://github.com/azuyamat/pace/issues
65+
package_identifier: Azuyamat.Pace
66+
path: manifests/a/Azuyamat/Pace/{{.Version}}
67+
commit_msg_template: "New version: Azuyamat.Pace version {{.Version}}"
68+
homepage: https://github.com/azuyamat/pace
69+
description: |
70+
Pace is a task runner that allows you to define, manage, and execute
71+
tasks with dependencies, hooks, caching, and file watching.
72+
license_url: https://github.com/azuyamat/pace/blob/master/LICENSE
73+
copyright: Azuyamat
74+
tags:
75+
- task-runner
76+
- build-tool
77+
- cli
78+
- golang
79+
repository:
80+
owner: microsoft
81+
name: winget-pkgs
82+
branch: "azuyamat-pace-{{.Version}}"
83+
token: "{{ .Env.WINGET_GITHUB_TOKEN }}"

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Azuyamat
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

cmd/pace/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package main
33
import (
44
"os"
55

6-
"azuyamat.dev/pace/internal/command"
7-
"azuyamat.dev/pace/internal/config"
8-
"azuyamat.dev/pace/internal/logger"
6+
"github.com/azuyamat/pace/internal/command"
7+
"github.com/azuyamat/pace/internal/config"
8+
"github.com/azuyamat/pace/internal/logger"
99
)
1010

1111
const ConfigFile = "config.pace"

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module azuyamat.dev/pace
1+
module github.com/azuyamat/pace
22

33
go 1.23.2
44

internal/command/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package command
22

3-
import "azuyamat.dev/pace/internal/config"
3+
import "github.com/azuyamat/pace/internal/config"
44

55
type Flag struct {
66
Label string

internal/command/executer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"fmt"
55
"strings"
66

7-
"azuyamat.dev/pace/internal/config"
8-
"azuyamat.dev/pace/internal/logger"
7+
"github.com/azuyamat/pace/internal/config"
8+
"github.com/azuyamat/pace/internal/logger"
99
)
1010

1111
func Execute(raw []string, cfg *config.Config) error {

internal/command/help.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package command
33
import (
44
"fmt"
55

6-
"azuyamat.dev/pace/internal/logger"
6+
"github.com/azuyamat/pace/internal/logger"
77
)
88

99
func init() {

internal/command/list.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package command
33
import (
44
"sort"
55

6-
"azuyamat.dev/pace/internal/config"
7-
"azuyamat.dev/pace/internal/logger"
6+
"github.com/azuyamat/pace/internal/config"
7+
"github.com/azuyamat/pace/internal/logger"
88
)
99

1010
func init() {

internal/command/run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package command
22

33
import (
4-
"azuyamat.dev/pace/internal/runner"
4+
"github.com/azuyamat/pace/internal/runner"
55
)
66

77
func init() {

0 commit comments

Comments
 (0)