-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (33 loc) · 1.11 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
# workflow name
name: Generate release-artifacts
on:
release:
types: [created]
permissions:
contents: read
packages: write
# workflow tasks
jobs:
release-matrix:
name: Release Go binaries
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin, windows, freebsd]
goarch: [amd64, 386, arm64, arm]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v2
with:
go-version: 1.23.1
- name: Build
run: go build -o masterclass-dl-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.os == 'windows' && '.exe' || '' }}
- name: Upload to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./masterclass-dl-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.os == 'windows' && '.exe' || '' }}
asset_name: masterclass-dl-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.os == 'windows' && '.exe' || '' }}
asset_content_type: application/octet-stream