Skip to content

Commit acab854

Browse files
author
MenD32
committed
tests: adding binary to release
Signed-off-by: MenD32 <amit@jounce.io>
1 parent 8c87197 commit acab854

File tree

2 files changed

+38
-11
lines changed

2 files changed

+38
-11
lines changed

.github/workflows/release.yaml

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
release-matrix: &release-matrix
2+
goos: [linux, darwin, windows]
3+
goarch: [amd64, arm64]
4+
15
name: Create Tag
26

37
on:
@@ -15,7 +19,7 @@ jobs:
1519
runs-on: ubuntu-latest
1620
steps:
1721
- name: Checkout repository
18-
uses: actions/checkout@v4.2.2
22+
uses: actions/checkout@v4
1923

2024
- name: Create Tag
2125
id: create_tag
@@ -24,29 +28,52 @@ jobs:
2428
git tag $TAG_NAME
2529
git push origin $TAG_NAME
2630
27-
release:
31+
build:
2832
needs: create_tag
2933
name: Create Release
30-
runs-on: ubuntu-latest
34+
runs-on: ubuntu-24.0§
35+
strategy:
36+
matrix: *release-matrix
3137

3238
steps:
3339
- name: Checkout code
34-
uses: actions/checkout@v4.2.2
40+
uses: actions/checkout@v4
3541

3642
- name: Set up Go
37-
uses: actions/setup-go@v5.3.0
43+
uses: actions/setup-go@v5
3844
with:
3945
go-version: '1.23.4'
40-
41-
- name: Install dependencies
42-
run: go mod download
4346

4447
- name: Build
45-
run: make build
48+
run: make build GOOS=${{ matrix.goarch }} GOARCH=${{ matrix.goarch }}
49+
50+
- name: Upload artifact
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: shakespeare-${{ matrix.goos }}-${{ matrix.goarch }}
54+
path: dist/shakespeare
55+
56+
57+
release:
58+
needs: build
59+
runs-on: ubuntu-24.04
60+
61+
strategy:
62+
matrix: *release-matrix
63+
64+
steps:
65+
- name: Download artifacts
66+
uses: actions/download-artifact@v4
67+
with:
68+
name: shakespeare-${{ matrix.goos }}-${{ matrix.goarch }}
69+
path: dist/shakespeare-${{ matrix.goos }}-${{ matrix.goarch }}
70+
4671

4772
- name: Release
4873
uses: softprops/action-gh-release@v2
4974
with:
5075
token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
5176
tag_name: ${{ github.event.inputs.tag_name }}
77+
files: |
78+
dist/shakespeare-${{ matrix.goos }}-${{ matrix.goarch }}
5279

.github/workflows/unit-test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99

1010
steps:
1111
- name: Checkout code
12-
uses: actions/checkout@v4.2.2
12+
uses: actions/checkout@v4
1313

1414
- name: Set up Go
15-
uses: actions/setup-go@v5.3.0
15+
uses: actions/setup-go@v5
1616
with:
1717
go-version: '1.23.4'
1818

0 commit comments

Comments
 (0)