Skip to content

Commit d154d3f

Browse files
fix: backporting the workflow scripts to 252-patch @W-16974485@ (#234)
* fix: backporting the workflow scripts to 252-patch @W-16974485@ * fix: add 252-patch branch as release branch
1 parent b06021f commit d154d3f

File tree

6 files changed

+34
-5
lines changed

6 files changed

+34
-5
lines changed

.github/workflows/create-github-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- main
77
- prerelease/**
8+
- 252-patch
89
tags-ignore:
910
- '*'
1011
workflow_dispatch:

.github/workflows/onRelease.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,32 @@ jobs:
1414
getDistTag:
1515
outputs:
1616
tag: ${{ steps.distTag.outputs.tag }}
17+
version: ${{ steps.distTag.outputs.version }}
1718
runs-on: ubuntu-latest
1819
steps:
1920
- uses: actions/checkout@v4
2021
with:
2122
ref: ${{ github.event.release.tag_name || inputs.tag }}
2223
- uses: salesforcecli/github-workflows/.github/actions/getPreReleaseTag@main
2324
id: distTag
25+
26+
getMajorVersion:
27+
needs: [getDistTag]
28+
outputs:
29+
major: ${{ steps.parsedVersion.outputs.major }}
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: salesforcecli/github-workflows/.github/actions/parse-semver@main
33+
with:
34+
input_string: ${{ needs.getDistTag.outputs.version }}
35+
2436
npm:
2537
uses: salesforcecli/github-workflows/.github/workflows/npmPublish.yml@main
26-
needs: [getDistTag]
38+
needs: [getDistTag, getMajorVersion]
2739
with:
2840
#ctc: true
2941
sign: true
30-
tag: ${{ needs.getDistTag.outputs.tag || 'latest' }}
42+
tag: ${{ needs.getDistTag.outputs.tag || (needs.getMajorVersion.outputs.major == '1') && 'latest' || 'next' }}
3143
githubTag: ${{ github.event.release.tag_name || inputs.tag }}
3244

3345
secrets: inherit

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: tests
22
on:
33
push:
4-
branches-ignore: [main]
4+
branches-ignore: [main, 252-patch]
55
workflow_dispatch:
66

77
jobs:

.github/workflows/validate-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55
types: [opened, reopened, edited]
66
# only applies to PRs that want to merge to main
7-
branches: [main]
7+
branches: [main, 252-patch]
88

99
jobs:
1010
pr-validation:

CONTRIBUTING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Release process
2+
3+
### Branches
4+
5+
The primary working branch for this repo is the `main` branch. This branch tracks the in-development branch of core. The patch branches are named `252-patch` and such. The patch branches track the production branches of core. A new patch branch is created at Code Line Cut Over(CLCO).
6+
7+
Any bug fixes targeted for production should be first committed to the `main` branch and then backported to the appropriate patch branch.
8+
9+
### Versioning
10+
11+
This repo has been setup to release using githooks. Any PR merged to `main` branch will be immediately released and tagged as `next`. For the patch branches, the tag is either `latest` or `prerelease` based on the configuration in the [onRelease](.github/workflows/onRelease.yml) github hook. The `latest` tag is used for the patch branch tracking the production branches of core.
12+
13+
The Salesforce release is deployed in a staggered manner. There is a phase where the upcoming production release is available on Sandboxes as a preview to customers. Such customers can use the `prerelease` version of the plugin. At CLCO, the new patch branch will be set to release with `prerelease` tag. After R2b release, the `prerelease` version will be promoted to be the `latest` by modifying the [onRelease](.github/workflows/onRelease.yml) github hook.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,5 +217,8 @@
217217
}
218218
},
219219
"exports": "./lib/index.js",
220-
"type": "module"
220+
"type": "module",
221+
"volta": {
222+
"node": "20.11.0"
223+
}
221224
}

0 commit comments

Comments
 (0)