Skip to content

Commit 2aede8f

Browse files
committed
ADD: CI
1 parent e241d1b commit 2aede8f

File tree

4 files changed

+732
-4
lines changed

4 files changed

+732
-4
lines changed

.github/workflows/release.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
on:
2+
release:
3+
types: [created]
4+
5+
permissions:
6+
contents: write
7+
packages: write
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Setup Go
15+
uses: actions/setup-go@v5
16+
with:
17+
go-version: '1.23.x'
18+
- name: Install dependencies
19+
run: go get .
20+
- name: Build
21+
run: make build
22+
- name: Test
23+
run: make test
24+
25+
release:
26+
needs: test
27+
name: Release Go Binary
28+
runs-on: ubuntu-latest
29+
strategy:
30+
matrix:
31+
goos: [darwin]
32+
goarch: [amd64, arm64]
33+
exclude:
34+
- goarch: "386"
35+
goos: darwin
36+
- goarch: arm64
37+
goos: windows
38+
steps:
39+
- uses: actions/checkout@v4
40+
- uses: wangyoucao577/go-release-action@v1
41+
with:
42+
github_token: ${{ secrets.GITHUB_TOKEN }}
43+
goos: ${{ matrix.goos }}
44+
goarch: ${{ matrix.goarch }}
45+
goversion: "https://dl.google.com/go/go1.23.1.linux-amd64.tar.gz"
46+
project_path: "./"
47+
binary_name: "glue"
48+
extra_files: LICENSE README.md

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.out
2+
*~
3+
#*
4+
.DS_Store

0 commit comments

Comments
 (0)