forked from forcedotcom/salesforcedx-vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreateAndTestBetaReleaseBranch.yml
More file actions
68 lines (63 loc) · 2.35 KB
/
createAndTestBetaReleaseBranch.yml
File metadata and controls
68 lines (63 loc) · 2.35 KB
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
name: Create and Test Beta Release Branch
on:
workflow_dispatch:
jobs:
create_branch:
name: 'Create Branch'
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
branch: ${{ steps.branch.outputs.branch }}
result: ${{ steps.result.outputs.result }}
env:
RELEASE_TYPE: 'beta'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: 'main'
ssh-strict: false
token: ${{ secrets.IDEE_GH_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ vars.NODE_VERSION || 'lts/*' }}
- uses: ./.github/actions/gitConfig
with:
email: ${{ secrets.IDEE_GH_EMAIL }}
- name: Retrieve Scripts
run: |
git clone https://github.com/forcedotcom/bundle-publish-scripts.git
- name: Update references for Publishing
run: |
node bundle-publish-scripts/scripts/update-references-in-vsce.js
node bundle-publish-scripts/scripts/update-bundle-configs-in-vsce.js
- uses: salesforcecli/github-workflows/.github/actions/npmInstallWithRetries@main
- run: rm -rf ./bundle-publish-scripts
- name: Create and Push the Release Branch
id: create_step
run: |
echo "Creating a beta release from branch main"
node scripts/create-release-branch.js
- id: result
run: echo "result=${{ job.status }}" >> $GITHUB_OUTPUT
- id: version
run: echo "version="$(node -pe "require('./packages/salesforcedx-vscode/package.json').version")"" >> $GITHUB_OUTPUT
- id: branch
run: echo "branch=release/v${{ steps.version.outputs.version }}" >> $GITHUB_OUTPUT
confirm_build:
environment: publish
runs-on: ubuntu-latest
needs: create_branch
name: 'Confirm Beta Release Branch Release'
steps:
- run: echo "Please push your change to update versions for any dependencies if required"
run_build_and_test:
if: ${{ needs.create_branch.result == 'success' }} # Only run this if the previous job is successful
uses: ./.github/workflows/buildAndTest.yml
name: 'Run Build and Unit Test'
needs: [create_branch, confirm_build]
secrets: inherit
with:
branch: ${{needs.create_branch.outputs.branch}}
label: ${{needs.create_branch.outputs.version}}