-
Notifications
You must be signed in to change notification settings - Fork 113
61 lines (59 loc) · 1.34 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
binary:
runs-on: ubuntu-latest
strategy:
matrix:
os: [linux, darwin, windows]
arch: [amd64, arm64]
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: go version
-
name: Build
run: |
GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} make build
ls -al bin/
-
name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: compose-spec-${{ matrix.os }}-${{ matrix.arch }}
path: ./bin/*
if-no-files-found: error
release:
permissions:
contents: write # to create a release (ncipollo/release-action)
runs-on: ubuntu-latest
needs:
- binary
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Download artifacts
uses: actions/download-artifact@v4
with:
path: bin/
merge-multiple: true
-
name: GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: bin/*
generateReleaseNotes: true
draft: true
token: ${{ secrets.GITHUB_TOKEN }}