-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (42 loc) · 1.44 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: Build and create release on tag
on:
push:
tags:
- 'v*'
jobs:
release:
name: Build and release
runs-on: ubuntu-latest
steps:
- name: Set TAG
run: echo TAG=${GITHUB_REF:10} >> $GITHUB_ENV
- name: Set ARCHIVE
run: echo ARCHIVE=tigrfont-${TAG}.tgz >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ^1.19
id: go
- name: Check out code
uses: actions/checkout@v3
- name: Build for intel linux
run: mkdir linux && GOOS=linux GOARCH=amd64 go build -v -o linux/tigrfont ./cmd/tigrfont
- name: Build for intel macos
run: mkdir macintel && GOOS=darwin GOARCH=amd64 go build -v -o macintel/tigrfont ./cmd/tigrfont
- name: Build for arm macos
run: mkdir macarm && GOOS=darwin GOARCH=arm64 go build -v -o macarm/tigrfont ./cmd/tigrfont
- name: Build for windows
run: mkdir windows && GOOS=windows GOARCH=amd64 go build -v -o windows/tigrfont.exe ./cmd/tigrfont
- name: Pack release
id: pack_release
run: tar czf $ARCHIVE linux macintel macarm windows
- name: Create release
id: create_release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: ${{ env.ARCHIVE }}
tag_name: ${{ github.ref }}
name: ${{ env.TAG }}
body: ""
draft: true