-
Notifications
You must be signed in to change notification settings - Fork 39
40 lines (39 loc) · 1.14 KB
/
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
name: "Create draft release with binaries after tag"
on:
push:
tags: ["v*"]
permissions:
contents: write # to upload the binaries to the release
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: ["linux"]
arch: ["amd64", "arm64"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: "1.20"
- run: mkdir build
- run: go build -o build/syncv3_${{ matrix.os }}_${{ matrix.arch }} ./cmd/syncv3
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
- name: "Upload binary as artifact"
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-${{ matrix.arch }}
path: build/syncv3_${{ matrix.os }}_${{ matrix.arch }}
create-release:
runs-on: ubuntu-latest
steps:
- name: "Fetch all binaries"
uses: actions/download-artifact@v3
- name: "Create release"
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
with:
files: build/*
draft: True
fail_on_unmatched_files: true