Skip to content

fix: backporting the workflow scripts to 252-patch @W-16974485@ #234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/create-github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- prerelease/**
- 252-patch
tags-ignore:
- '*'
workflow_dispatch:
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/onRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,32 @@ jobs:
getDistTag:
outputs:
tag: ${{ steps.distTag.outputs.tag }}
version: ${{ steps.distTag.outputs.version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
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 }}
runs-on: ubuntu-latest
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: tests
on:
push:
branches-ignore: [main]
branches-ignore: [main, 252-patch]
workflow_dispatch:

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
types: [opened, reopened, edited]
# only applies to PRs that want to merge to main
branches: [main]
branches: [main, 252-patch]

jobs:
pr-validation:
Expand Down
13 changes: 13 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -217,5 +217,8 @@
}
},
"exports": "./lib/index.js",
"type": "module"
"type": "module",
"volta": {
"node": "20.11.0"
}
}