-
Notifications
You must be signed in to change notification settings - Fork 5
89 lines (80 loc) · 2.92 KB
/
release.yaml
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
name: release
on:
workflow_dispatch:
inputs:
provided-github-release-id:
type: string
description: Providing this value will reuse previous version and github release, use only in case of failed previous release
do-npm-publish:
type: boolean
default: true
description: Providing false will skip `npm publish`, use only in case of failed previous release
do-linux-build:
type: boolean
default: true
description: Providing false will skip linux build, use only in case of failed previous release
do-macos-build:
type: boolean
default: true
description: Providing false will skip macos build, use only in case of failed previous release
do-windows-build:
type: boolean
default: true
description: Providing false will skip windows build, use only in case of failed previous release
jobs:
publish-init:
runs-on: ubuntu-latest
outputs:
github-release-id: ${{ steps.init-step.outputs.github-release-id }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-node@v4
with:
node-version: 18
- run: npm ci
- run: git config --global user.name "${GITHUB_ACTOR}"
- run: git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com"
- run: npm run publish-init-project --workspace @project-gauntlet/build
id: init-step
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PROVIDED_GITHUB_RELEASE_ID: ${{ inputs.provided-github-release-id }}
publish-linux:
needs:
- publish-init
if: ${{ inputs.do-linux-build }}
uses: ./.github/workflows/setup-linux.yaml
with:
command: npm run publish-linux-project --workspace @project-gauntlet/build
github-release-id: ${{ needs.publish-init.outputs.github-release-id }}
publish-windows:
needs:
- publish-init
if: ${{ inputs.do-windows-build }}
uses: ./.github/workflows/setup-windows.yaml
with:
command: npm run publish-windows-project --workspace @project-gauntlet/build
github-release-id: ${{ needs.publish-init.outputs.github-release-id }}
publish-macos:
needs:
- publish-init
if: ${{ inputs.do-macos-build }}
uses: ./.github/workflows/setup-macos.yaml
with:
command: npm run publish-macos-project --workspace @project-gauntlet/build
github-release-id: ${{ needs.publish-init.outputs.github-release-id }}
secrets: inherit
publish-final:
needs:
- publish-linux
- publish-macos
- publish-windows
- publish-init
if: ${{ inputs.do-npm-publish }}
uses: ./.github/workflows/setup-linux.yaml
with:
command: npm run publish-final-project --workspace @project-gauntlet/build
github-release-id: ${{ needs.publish-init.outputs.github-release-id }}
secrets: inherit