Skip to content

Commit 98912ca

Browse files
committed
Add GitHub Actions workflow file that may or may not work
Signed-off-by: Samuli Seppänen <samuli.seppanen@puppeteers.net>
1 parent cdf9c9f commit 98912ca

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build and Publish Go Program
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build-and-publish:
10+
name: Build and Publish
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Set up Go
15+
uses: actions/setup-go@v2
16+
with:
17+
go-version: '1.24.2'
18+
19+
- name: Check out code
20+
uses: actions/checkout@v2
21+
22+
- name: Build binary
23+
run: |
24+
go build -o updates_exporter main.go
25+
env:
26+
CGO_ENABLED: 0
27+
GOOS: linux
28+
GOARCH: amd64
29+
30+
- name: Publish binary
31+
uses: softprops/action-gh-release@v1
32+
with:
33+
files: updates_exporter
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+

0 commit comments

Comments
 (0)