-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: add semantic release bot * ci: document semantic bot usage * docs: correct document typo * ci: remove node v16 * ci: change semantic-release format from YAML to JSON * chore: convert commitlint config to mjs
- Loading branch information
1 parent
9a0bd9f
commit 5919aad
Showing
7 changed files
with
11,045 additions
and
3,248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# main is dev integration branch, merge main into release branch to trigger ga release. | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
lint-build-test: | ||
name: Lint, Build, Test - Node ${{ matrix.node-version }} on ${{ matrix.os }} | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
node-version: | ||
- 18.x | ||
- 20.x | ||
os: | ||
- ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install dependencies | ||
run: npm clean-install | ||
- run: npm run lint | ||
- run: npm run build | ||
- run: npm run test | ||
|
||
release: | ||
name: Release | ||
needs: lint-build-test # previous job MUST pass to make a release! | ||
runs-on: ubuntu-latest | ||
|
||
# Skip running release workflow on forks | ||
if: github.repository_owner == 'salesforce' && github.event_name == 'push' | ||
|
||
permissions: | ||
contents: write # to be able to publish a GitHub release | ||
issues: write # to be able to comment on released issues | ||
pull-requests: write # to be able to comment on released pull requests | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Need all git history & tags to determine next release version. | ||
persist-credentials: false | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: npm | ||
node-version: 20.x | ||
|
||
- name: Install dependencies | ||
run: npm clean-install | ||
|
||
- run: npm run build | ||
|
||
- name: Release | ||
run: npx semantic-release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
npx --no -- commitlint --edit $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"branches": ["release-1"], | ||
"plugins": [ | ||
[ | ||
"@semantic-release/commit-analyzer", | ||
{ | ||
"preset": "conventionalcommits", | ||
"releaseRules": [ | ||
{ | ||
"type": "docs", | ||
"scope": "README", | ||
"release": "patch" | ||
} | ||
] | ||
} | ||
], | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"@semantic-release/changelog", | ||
{ | ||
"changelogTitle": "# Changelog\n\nAll notable changes to this project will be documented in this file." | ||
} | ||
], | ||
[ | ||
"@semantic-release/npm", | ||
{ | ||
"npmPublish": true, | ||
"tarballDir": "tarball" | ||
} | ||
], | ||
[ | ||
"@semantic-release/github", | ||
{ | ||
"assets": "tarball/*.tgz" | ||
} | ||
] | ||
], | ||
"debug": true, | ||
"dryRun": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* Copyright (c) 2024, salesforce.com, inc. | ||
* All rights reserved. | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause | ||
*/ | ||
|
||
/* This is the pattern from semantic-release */ | ||
const automaticCommitPattern = /^chore\(release\):.*\[skip ci\]/; | ||
|
||
/** @type {import('@commitlint/types').UserConfig} */ | ||
export default { | ||
extends: ['@commitlint/config-conventional'], | ||
ignores: [(commitMsg) => automaticCommitPattern.test(commitMsg)] | ||
}; |
Oops, something went wrong.