-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (50 loc) · 1.41 KB
/
Copy pathrelease.yml
File metadata and controls
61 lines (50 loc) · 1.41 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
61
name: Release
on:
release:
types: [published]
paths:
- "**/*.go"
- "go.mod"
- "go.sum"
- ".github/workflows/*.yml"
jobs:
build:
strategy:
matrix:
build: [macos-intel, macos-arm64, linux]
include:
- build: macos-intel
os: macos-15-intel
archive-name: darwin-intel.tar.gz
- build: macos-arm64
os: macos-15
archive-name: darwin-arm64.tar.gz
- build: linux
os: ubuntu-22.04
archive-name: linux.tar.gz
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.22
- name: Download dependencies
run: go mod download
- name: Build
run: go build -v -o snow .
- name: Prepare Packaging
run: tar zcvf snow-${{ matrix.archive-name }} snow LICENSE
- name: Checksum
run: shasum -a 256 snow-${{ matrix.archive-name }} | tee snow-${{ matrix.archive-name }}.sha256
- name: Release version
uses: softprops/action-gh-release@v2
if: github.event_name == 'release'
with:
files: |
snow-${{ matrix.archive-name }}
snow-${{ matrix.archive-name }}.sha256
token: ${{ secrets.GITHUB_TOKEN }}