-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (51 loc) · 1.38 KB
/
Copy pathrelease.yml
File metadata and controls
55 lines (51 loc) · 1.38 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
name: release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [amd64]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: "1.22"
- name: Build
run: |
mkdir -p dist
EXT=""
if [ "${{ matrix.goos }}" = "windows" ]; then EXT=".exe"; fi
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o dist/github-fork-manager-${{ matrix.goos }}-${{ matrix.goarch }}${EXT} ./cmd/github-fork-manager
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: binaries-${{ matrix.goos }}-${{ matrix.goarch }}
path: dist/*
retention-days: 7
release:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v4
with:
pattern: binaries-*
path: dist
merge-multiple: true
- name: Create checksums
run: |
(cd dist && shasum -a 256 * > checksums.txt)
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: |
dist/github-fork-manager-*
dist/checksums.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}