-
Notifications
You must be signed in to change notification settings - Fork 1
121 lines (109 loc) · 4 KB
/
build-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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: build
on:
push:
branches:
- 'main'
tags:
- 'v*'
pull_request:
permissions:
contents: write
packages: write
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: 1.20.0
cache: true
- run: go install fyne.io/fyne/v2/cmd/fyne@latest
- run: cd ./cmd/southpark-downloader-ui && fyne package --release
- run: mv ./cmd/southpark-downloader-ui/southpark-downloader-ui.exe southpark-downloader-ui-windows-amd64.exe
- uses: actions/upload-artifact@v4
with:
name: southpark-downloader-ui-windows-amd64
path: southpark-downloader-ui-windows-amd64.exe
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: 1.20.0
cache: true
- run: sudo apt update && sudo apt install gcc libegl1-mesa-dev xorg-dev
- run: go install fyne.io/fyne/v2/cmd/fyne@latest
- run: cd ./cmd/southpark-downloader-ui && fyne package --release
- run: mv ./cmd/southpark-downloader-ui/southpark-downloader-ui.tar.xz southpark-downloader-ui-linux-amd64.tar.xz
- uses: actions/upload-artifact@v4
with:
name: southpark-downloader-ui-linux-amd64
path: southpark-downloader-ui-linux-amd64.tar.xz
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: 1.20.0
cache: true
- run: go install fyne.io/fyne/v2/cmd/fyne@latest
- run: cd ./cmd/southpark-downloader-ui && fyne package --release
- run: mv ./cmd/southpark-downloader-ui/southpark-downloader-ui.app southpark-downloader-ui-macos-amd64.app
- run: tar czf southpark-downloader-ui-macos-amd64.tar.gz southpark-downloader-ui-macos-amd64.app
- uses: actions/upload-artifact@v4
with:
name: southpark-downloader-ui-macos-amd64
path: southpark-downloader-ui-macos-amd64.tar.gz
release:
runs-on: ubuntu-latest
needs: [build-windows, build-linux, build-macos]
steps:
- uses: actions/download-artifact@v4
with:
name: southpark-downloader-ui-linux-amd64
- uses: actions/download-artifact@v4
with:
name: southpark-downloader-ui-windows-amd64
- uses: actions/download-artifact@v4
with:
name: southpark-downloader-ui-macos-amd64
- uses: actions/create-release@v1
id: create-new-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.run_number }}
release_name: Release ${{ github.run_number }}
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }}
asset_path: ./southpark-downloader-ui-windows-amd64.exe
asset_name: southpark-downloader-ui-windows-amd64.exe
asset_content_type: application/vnd.microsoft.portable-executable
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }}
asset_path: ./southpark-downloader-ui-linux-amd64.tar.xz
asset_name: southpark-downloader-ui-linux-amd64.tar.xz
asset_content_type: application/x-gtar
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }}
asset_path: ./southpark-downloader-ui-macos-amd64.tar.gz
asset_name: southpark-downloader-ui-macos-amd64.tar.gz
asset_content_type: application/x-gtar