This repository has been archived by the owner on Jun 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 91
84 lines (75 loc) · 2 KB
/
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
#This pipeline builds sfpowerkit
name: 'Release'
on:
push:
branches:
- main
- develop
paths-ignore:
- 'docs/**'
- '**.md'
- 'decision records/**'
workflow_dispatch:
jobs:
build:
name: 'build packages'
uses: ./.github/workflows/buildPackage.yml
with:
version: ${{ github.ref }}
publish: true
environment: build
secrets:
npm-token: ${{ secrets.NPM_TOKEN }}
concurrency:
group: build
test:
name: 'smoke test'
uses: ./.github/workflows/review-smoke-test.yml
with:
environment: test
secrets: inherit
needs: [build]
hotfix:
name: 'sfpowerkit hotfix'
uses: ./.github/workflows/promotePackage.yml
with:
version: 'hotfix'
pathToPackageJson: 'package.json'
environment: sfpowerkit-hotfix
secrets:
npm-token: ${{ secrets.NPM_TOKEN }}
if: ${{ github.ref == 'refs/heads/main' }}
needs: test
alpha:
name: 'sfpowerkit alpha'
uses: ./.github/workflows/promotePackage.yml
with:
version: 'alpha'
pathToPackageJson: 'package.json'
environment: sfpowerkit-alpha
secrets:
npm-token: ${{ secrets.NPM_TOKEN }}
if: ${{ github.ref == 'refs/heads/develop' }}
needs: test
beta:
name: 'sfpowerkit beta'
uses: ./.github/workflows/promotePackage.yml
with:
version: 'beta'
pathToPackageJson: 'package.json'
environment: sfpowerkit-beta
secrets:
npm-token: ${{ secrets.NPM_TOKEN }}
if: ${{ github.ref == 'refs/heads/develop' }}
needs: alpha
prod:
name: 'sfpowerkit prod'
uses: ./.github/workflows/promotePackage.yml
with:
version: 'latest'
pathToPackageJson: 'package.json'
environment: sfpowerkit-prod
secrets:
npm-token: ${{ secrets.NPM_TOKEN }}
if: ${{ always() && (github.ref == 'refs/heads/main' && needs.hotfix.result == 'success' || github.ref == 'refs/heads/develop' && needs.beta.result == 'success') }}
needs: [hotfix, beta]