54 lines (49 loc) · 1.66 KB
/
full-release-pipeline.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
name: Full Release Pipeline
on:
workflow_dispatch:
inputs:
isProdTrigger:
type: boolean
description: Triggered from prod watcher?
required: true
default: false
workflow_call:
inputs:
isProdTrigger:
type: boolean
description: Triggered from prod watcher?
required: true
default: false
jobs:
get-version-channel:
runs-on: ubuntu-latest
outputs:
channel: ${{ steps.getVersion.outputs.channel }}
version: ${{ steps.getVersion.outputs.version }}
isProdRelease: ${{ fromJSON(inputs.isProdTrigger) && !steps.getVersion.outputs.channel }}
steps:
- uses: actions/checkout@v3
- id: getVersion
uses: ./.github/actions/get-version-and-channel/
with:
path: './packages/cli/package.json'
publish:
needs: [get-version-channel]
# channel is checked to avoid deploying from a malformed branch
if: fromJSON(needs.get-version-channel.outputs.isProdRelease) || (!fromJSON(inputs.isProdTrigger) && !!needs.get-version-channel.outputs.channel)
uses: ./.github/workflows/publish-npm-gh.yml
with:
isProdRelease: ${{ fromJSON(needs.get-version-channel.outputs.isProdRelease) }}
secrets: inherit
pack-upload:
needs: [ publish ]
uses: ./.github/workflows/pack-upload.yml
secrets: inherit
promote:
needs: [get-version-channel, pack-upload]
if: needs.pack-upload.result == 'success'
uses: ./.github/workflows/promote-release.yml
with:
version: ${{ needs.get-version-channel.outputs.version }}
isProdRelease: ${{ fromJSON(needs.get-version-channel.outputs.isProdRelease) }}
secrets: inherit