Skip to content

Commit 6d2859e

Browse files
committed
Add GitHub Actions workflow to build and upload Go binary
1 parent 85c14f5 commit 6d2859e

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build and Upload Go Binary
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Set up Go
14+
uses: actions/setup-go@v5
15+
with:
16+
go-version: '1.21'
17+
18+
- name: Build binary
19+
run: |
20+
mkdir -p releases
21+
go build -o releases/commit-msg-go commit-msg.go
22+
23+
- name: Commit and push binary
24+
run: |
25+
git config user.name "github-actions[bot]"
26+
git config user.email "github-actions[bot]@users.noreply.github.com"
27+
git add releases/commit-msg-go
28+
git commit -m "ci: update commit-msg-go binary [skip ci]" || exit 0
29+
git push

release/commit-msg-go

-8.81 MB
Binary file not shown.

0 commit comments

Comments
 (0)