-
Notifications
You must be signed in to change notification settings - Fork 4
61 lines (53 loc) · 1.34 KB
/
Copy pathrelease.yml
File metadata and controls
61 lines (53 loc) · 1.34 KB
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
name: Release
on:
push:
tags:
- 'v*'
jobs:
build:
name: Build Binaries
runs-on: ubuntu-latest
strategy:
matrix:
include:
- arch: amd64
- arch: arm64
steps:
- uses: actions/checkout@v6
- name: Build binary
run: |
docker buildx build . \
--target binary \
--build-arg TARGETOS=linux \
--build-arg TARGETARCH=${{ matrix.arch }} \
--output type=local,dest=build \
--cache-from type=gha \
--cache-to type=gha,mode=max
- name: Upload binary artifact
uses: actions/upload-artifact@v6
with:
name: linkwinbt-linux-${{ matrix.arch }}
path: build/linkwinbt*
retention-days: 1
release:
name: Create Release
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- name: Download all artifacts
uses: actions/download-artifact@v6
with:
path: artifacts
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG=${GITHUB_REF#refs/tags/}
gh release create "$TAG" \
--title "$TAG" \
--draft \
--generate-notes \
artifacts/**/*