-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (35 loc) · 902 Bytes
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Build and Release Linodsync Binary
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
name: Build Static Linux Binary
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20
- name: Build static binary for Linux amd64
run: |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o linodsync
mkdir -p build
mv linodsync build/
release:
name: Create GitHub Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Upload release assets
uses: softprops/action-gh-release@v1
with:
files: build/linodsync
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}