-
Notifications
You must be signed in to change notification settings - Fork 16
119 lines (101 loc) · 3.97 KB
/
ci-channel-test.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
117
118
119
name: CI (channels/test)
on:
push:
branches:
- releases/1.10
- feat/ideamodule
paths:
- 'SharePointFramework/**'
- 'Install/**'
- 'Templates/**'
- .github/workflows/ci-channel-test.yml
env:
CI_CERT_BASE64: ${{ secrets.CI_CERT_BASE64 }}
CI_TENANT: ${{ secrets.CI_TENANT }}
CI_CLIENT_ID: ${{ secrets.CI_CLIENT_ID }}
jobs:
build_release_package_test:
name: Build release package (test channel)
runs-on: macos-latest
if: ${{ !contains(github.event.head_commit.message, '[skip-ci]') && !contains(github.event.head_commit.message, '[packages-only]') }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Set sha_short
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- uses: actions/setup-node@v3
with:
node-version: ${{ vars.NODE_VERSION }}
- name: Run Install/Build-Release.ps1 in CI mode for channel test
run: Install/Build-Release.ps1 -CI -SkipBundle -Channel test
shell: pwsh
- uses: actions/upload-artifact@v3
with:
name: release-package-test
path: release
outputs:
sha_short: ${{ steps.vars.outputs.sha_short }}
upgrade_channel_test:
needs: [build_release_package_test]
name: Upgrade (test channel)
runs-on: macos-latest
if: ${{ !contains(github.event.head_commit.message, '[skip-upgrade]') }}
steps:
- uses: actions/download-artifact@v3
with:
name: release-package-test
path: release
- name: Upgrade
run: release/Install.ps1 -Url "${{ vars.SP_URL_TEST }}" -Upgrade -CI -Tenant ${{ env.CI_TENANT }} -CertificateBase64Encoded ${{ env.CI_CERT_BASE64 }} -ClientId ${{ env.CI_CLIENT_ID }}
shell: powershell
upgrade_all_sites_to_latest:
needs: [build_release_package_test, upgrade_channel_test]
name: Upgrade all sites to latest (test channel)
runs-on: macos-latest
if: ${{ contains(github.event.head_commit.message, '[upgrade-all-sites-to-latest]') }}
steps:
- uses: actions/download-artifact@v3
with:
name: release-package-test
path: release
- name: Run script UpgradeAllSitesToLatest.ps1 in CI mode
run: release/Scripts/UpgradeAllSitesToLatest.ps1 -Url ${{ vars.SP_URL_TEST }} -CI -Tenant ${{ env.CI_TENANT }} -CertificateBase64Encoded ${{ env.CI_CERT_BASE64 }} -ClientId ${{ env.CI_CLIENT_ID }}
shell: powershell
build_release_package_test_packages_only:
name: Build release package - packages only (test channel)
runs-on: macos-latest
if: ${{ contains(github.event.head_commit.message, '[packages-only]')}}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Set sha_short
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- uses: actions/setup-node@v3
with:
node-version: ${{ vars.NODE_VERSION }}
- name: Run Install/Build-Release.ps1 in CI mode for channel test
run: Install/Build-Release.ps1 -CI -SkipBundle -SkipBuildPnPTemplates -Channel test
shell: pwsh
- uses: actions/upload-artifact@v3
with:
name: release-package-test
path: release
outputs:
sha_short: ${{ steps.vars.outputs.sha_short }}
upgrade_channel_test_packages_only:
needs: [build_release_package_test_packages_only]
name: Upgrade packages only (test channel)
runs-on: macos-latest
if: ${{ !contains(github.event.head_commit.message, '[skip-upgrade]') }}
steps:
- uses: actions/download-artifact@v3
with:
name: release-package-test
path: release
- name: Upgrade
run: release/Install.ps1 -Url "${{ vars.SP_URL_TEST }}" -Upgrade -CI -Tenant ${{ env.CI_TENANT }} -CertificateBase64Encoded ${{ env.CI_CERT_BASE64 }} -ClientId ${{ env.CI_CLIENT_ID }} -SkipTemplate
shell: powershell