-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (41 loc) · 1015 Bytes
/
go.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
44
45
46
47
48
name: Go
on:
push:
tags:
- '*'
workflow_dispatch:
pull_request:
branches: [ master ]
jobs:
build:
name: build
strategy:
matrix:
go-arch: [amd64]
go-os: [linux]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download dependencies
run: go mod download
- name: Build
run: env GOOS=${{ matrix.go-os }} GOARCH=${{ matrix.go-arch }} CGO_ENABLED=0 go build -o ./build/jbackup-${{ matrix.go-os }}-${{ matrix.go-arch }} .
- name: store build output
uses: actions/upload-artifact@v3
with:
name: build artifacts
path: build
release:
name: release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: build
- name: publish release
uses: ncipollo/release-action@v1
with:
artifacts: "build/build\ artifacts/*"
token: ${{ secrets.GITHUB_TOKEN }}