Skip to content

Commit 374b0af

Browse files
committed
add action workflow
1 parent 200ff0f commit 374b0af

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/release.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
10+
build:
11+
name: Build
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
steps:
16+
17+
- name: Set up Go 1.x
18+
uses: actions/setup-go@v3
19+
with:
20+
go-version: ^1.19
21+
id: go
22+
23+
- name: Check out code into the Go module directory
24+
uses: actions/checkout@v3
25+
26+
- name: Get dependencies
27+
run: go get -v -t -d ./...
28+
29+
- name: Test
30+
run: go test -v .
31+
32+
- name: Build linux-arm
33+
run: env GOOS=linux GOARCH=arm go build -v .
34+
- name: rename linux arm
35+
run: mv electric-usage-downloader electric-usage-downloader-linux-arm
36+
37+
- name: Create release
38+
id: create_release
39+
uses: ncipollo/release-action@v1
40+
with:
41+
artifacts: electric-usage-downloader-linux-arm
42+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)