-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (61 loc) · 1.72 KB
/
main.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
name: Main
on:
push:
branches:
- '**'
workflow_dispatch:
inputs:
publish-prerelease:
description: 'Publish prerelease version of the selected branch'
required: false
default: false
type: boolean
publish-web-apps-to-prod:
description: 'Publish web apps to prod'
required: false
default: false
type: boolean
jobs:
install-build:
uses: ./.github/workflows/build.yaml
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
check:
needs: install-build
uses: ./.github/workflows/check.yaml
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
vercel:
needs: [install-build, check]
uses: ./.github/workflows/vercel.yaml
with:
publish-web-apps-to-prod: ${{ !!inputs.publish-web-apps-to-prod }}
secrets:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
publish:
needs: [install-build, check]
if: >-
(github.ref_name == 'main' ||
github.ref_name == 'development' ||
github.ref_name == 'next' ||
inputs.publish-prerelease
) &&
!contains(github.event.head_commit.message, 'skip-release') &&
github.actor != 'dependabot[bot]' &&
github.actor != 'contentful-automation[bot]'
permissions:
contents: write
id-token: write
uses: ./.github/workflows/publish.yaml
with:
publish-prelease: ${{ !!inputs.publish-prerelease }}
secrets:
VAULT_URL: ${{ secrets.VAULT_URL }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
upload-artifact-cleanup:
if: ${{ always() }}
needs: [install-build, check, publish, vercel]
permissions:
actions: write
uses: ./.github/workflows/cleanup.yaml