From 20994b90f23635e43cb780a3d359ca1fb3b688dd Mon Sep 17 00:00:00 2001 From: Ravi Jayaramappa Date: Tue, 15 Oct 2024 16:06:22 -0700 Subject: [PATCH] feat!: 254 code line cut over, main now tracks 254(spring25) codeline @W-16974485@ (#203) * feat!: 254 code line cut over, main now tracks 254(spring25) codeline BREAKING CHANGE: this version works with 254(spring25) release and newer * fix: address feedback * fix: typos --- .github/workflows/create-github-release.yml | 1 + .github/workflows/onRelease.yml | 15 +++++++++++++-- CONTRIBUTING.md | 13 +++++++++++++ package.json | 5 ++++- 4 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/.github/workflows/create-github-release.yml b/.github/workflows/create-github-release.yml index 2021e82..0b744c0 100644 --- a/.github/workflows/create-github-release.yml +++ b/.github/workflows/create-github-release.yml @@ -5,6 +5,7 @@ on: branches: - main - prerelease/** + - 252-patch tags-ignore: - '*' workflow_dispatch: diff --git a/.github/workflows/onRelease.yml b/.github/workflows/onRelease.yml index 2627ec4..9389fb1 100644 --- a/.github/workflows/onRelease.yml +++ b/.github/workflows/onRelease.yml @@ -14,6 +14,7 @@ jobs: getDistTag: outputs: tag: ${{ steps.distTag.outputs.tag }} + version: ${{ steps.distTag.outputs.version }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -21,13 +22,23 @@ jobs: ref: ${{ github.event.release.tag_name || inputs.tag }} - uses: salesforcecli/github-workflows/.github/actions/getPreReleaseTag@main id: distTag + + getMajorVersion: + needs: [getDistTag] + outputs: + major: ${{ steps.parsedVersion.outputs.major }} + steps: + - uses: salesforcecli/github-workflows/.github/actions/parse-semver@main + with: + input_string: ${{ needs.getDistTag.outputs.version }} + npm: uses: salesforcecli/github-workflows/.github/workflows/npmPublish.yml@main - needs: [getDistTag] + needs: [getDistTag, getMajorVersion] with: #ctc: true sign: true - tag: ${{ needs.getDistTag.outputs.tag || 'latest' }} + tag: ${{ needs.getDistTag.outputs.tag || (needs.getMajorVersion.outputs.major == '1') && 'latest' || 'next' }} githubTag: ${{ github.event.release.tag_name || inputs.tag }} secrets: inherit diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..1a620d9 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,13 @@ +## Release process + +### Branches + +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). + +Any bug fixes targeted for production should be first committed to the `main` branch and then backported to the appropriate patch branch. + +### Versioning + +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. + +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. diff --git a/package.json b/package.json index 4c7e315..f4f419f 100644 --- a/package.json +++ b/package.json @@ -216,5 +216,8 @@ } }, "exports": "./lib/index.js", - "type": "module" + "type": "module", + "volta": { + "node": "20.11.0" + } }