-
Notifications
You must be signed in to change notification settings - Fork 205
55 lines (48 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Release
on:
push:
tags:
- "*"
env:
GO_VERSION: 1.17
CGO_ENABLED: 0
GO111MODULE: on
jobs:
build:
name: Build
strategy:
matrix:
os: [ linux, windows, darwin ]
arch: [ amd64, arm64, 386 ]
include:
- os: windows
file-extension: ".exe"
exclude:
- os: darwin
arch: 386
runs-on: ubuntu-latest
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
FILEEXTENSION: ${{ matrix.file-extension }}
steps:
- name: Checkout Git repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Get dependencies
run: |
go mod download
- name: Build binary
run: |
GOOS=${GOOS} GOARCH=${GOARCH} go build -o ./Releases/m3u8-${GOOS}-${GOARCH}${FILEEXTENSION} m3u8-downloader.go
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
./Releases/*