Skip to content

Commit 51b8e76

Browse files
authored
Merge pull request #40 from algorandfoundation/build/continuous-delivery
release: v1.0.0
2 parents 26f1f4f + 50b9d98 commit 51b8e76

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/CD.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- beta
8+
permissions:
9+
contents: write
10+
packages: write
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
goos: [ linux, darwin ]
17+
goarch: [ amd64, arm64 ]
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Install dependencies
21+
run: go get .
22+
- name: Build
23+
env:
24+
GOOS: ${{matrix.goos}}
25+
GOARCH: ${{matrix.goarch}}
26+
CGO_ENABLED: 0
27+
run: go build -o bin/algorun-${{matrix.goarch}}-${{matrix.goos}} *.go
28+
- uses: actions/upload-artifact@master
29+
with:
30+
name: algorun-${{matrix.goarch}}-${{matrix.goos}}
31+
path: bin/algorun-${{matrix.goarch}}-${{matrix.goos}}
32+
release:
33+
needs:
34+
- build
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v4
38+
- uses: actions/download-artifact@v4
39+
with:
40+
pattern: algorun*
41+
path: ./bin
42+
- uses: go-semantic-release/action@v1
43+
name: release
44+
id: semver
45+
with:
46+
github-token: ${{ secrets.GITHUB_TOKEN }}
47+
- name: Upload Release
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
run: gh release upload v${{steps.semver.outputs.version}} bin/**/*

0 commit comments

Comments
 (0)