Skip to content
This repository was archived by the owner on Mar 21, 2025. It is now read-only.

Commit b5c5401

Browse files
committed
Add github CD pipeline.
1 parent fccd01f commit b5c5401

File tree

2 files changed

+40
-15
lines changed

2 files changed

+40
-15
lines changed

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, macos-latest, windows-latest]
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@v5
22+
with:
23+
go-version: 1.22.x
24+
25+
- name: Build for ${{ matrix.os }}
26+
run: |
27+
cd sb
28+
if [ ${{ matrix.os }} == 'ubuntu-latest' ]; then
29+
GOOS=linux GOARCH=amd64 go build -o ../sb-cli-linux-amd64
30+
elif [ ${{ matrix.os }} == 'macos-latest' ]; then
31+
GOOS=darwin GOARCH=arm64 go build -o ../sb-cli-macos-arm64
32+
else
33+
GOOS=windows GOARCH=amd64 go build -o ../sb-cli-windows-amd64.exe
34+
fi
35+
36+
- name: Create a release
37+
uses: softprops/action-gh-release@v2
38+
with:
39+
files: sb-cli-*
40+

.vscode/launch.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)