-
Notifications
You must be signed in to change notification settings - Fork 81
116 lines (102 loc) · 3.31 KB
/
build-base.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
on:
workflow_call:
inputs:
goreleaser_args:
required: false
type: string
default: --snapshot
secrets:
SIGNPATH_API_TOKEN:
required: true
jobs:
build:
strategy:
matrix:
platform:
- os: linux
runs-on: ubuntu-latest
- os: windows
runs-on: windows-latest
goreleaser_args: "-p 1" # Wails packaging for windows cannot handle parallel builds
- os: darwin
runs-on: macos-latest
goreleaser_args: "-p 1" # Wails packaging for darwin cannot handle parallel builds
runs-on: ${{ matrix.platform.runs-on }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser ${{ inputs.goreleaser_args }}
uses: ./.github/actions/goreleaser
with:
args: release --split --clean ${{ matrix.platform.goreleaser_args }} ${{ inputs.goreleaser_args }}
env:
GGOOS: ${{ matrix.platform.os }}
- name: Archive artifacts
id: upload_artifacts
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.platform.os }}
path: dist/**/*
- name: Sign artifacts
id: sign_windows
if: ${{ matrix.platform.os == 'windows' && startsWith(github.ref, 'refs/tags/') }}
uses: signpath/github-action-submit-signing-request@v1
with:
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
organization-id: 'd1f0888a-08d3-44fe-9da0-6490890e20ea'
project-slug: 'SatisfactoryModManager'
signing-policy-slug: 'release-signing'
github-artifact-id: '${{ steps.upload_artifacts.outputs.artifact-id }}'
wait-for-completion: true
output-artifact-directory: 'dist/signed'
- name: Archive signed artifacts
if: ${{ matrix.platform.os == 'windows' && startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.platform.os }}
path: dist/signed/**/*
overwrite: true
finalize:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup
with:
backend: false
frontend: false
- name: Download windows artifacts
uses: actions/download-artifact@v4
with:
name: build-windows
path: dist
- name: Download linux artifacts
uses: actions/download-artifact@v4
with:
name: build-linux
path: dist
- name: Download darwin artifacts
uses: actions/download-artifact@v4
with:
name: build-darwin
path: dist
- name: Run GoReleaser Merge ${{ inputs.goreleaser_args }}
uses: ./.github/actions/goreleaser
with:
args: continue --merge ${{ inputs.goreleaser_args }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: build-all
path: dist/**/*