Skip to content

Commit 1113211

Browse files
committed
build: add commitizen and semantic-release
BREAKING CHANGE: Automation
1 parent 7c9a156 commit 1113211

7 files changed

Lines changed: 9588 additions & 2778 deletions

File tree

.github/workflows/changelogCheck.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/npmVersionCheck.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Semantic Release
2+
on:
3+
push:
4+
branches:
5+
- master # or main
6+
- lr/workflow-update
7+
8+
permissions:
9+
contents: read # for checkout
10+
11+
jobs:
12+
release:
13+
name: Release
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write # to be able to publish a GitHub release
17+
issues: write # to be able to comment on released issues
18+
pull-requests: write # to be able to comment on released pull requests
19+
id-token: write # to enable use of OIDC for npm provenance
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: "lts/*"
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
# consider npm provenance, see https://github.com/semantic-release/semantic-release/blob/master/docs/recipes/ci-configurations/github-actions.md#npm-provenance
35+
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
36+
run: npm audit signatures
37+
38+
- name: Build
39+
run: npm run build
40+
41+
# Use npx semantic-release to determine the next version
42+
- name: Release
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
46+
run: npx semantic-release --dry-run --no-ci

.github/workflows/tagAndPublish.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,27 @@ const App = () => {
5252

5353
You need to pass an object containing API endpoint callbacks as the `apiValue` prop of the ApiProvider as described in the [usage](#usage) section for the widget to work. [Here](./docs/APIDOCUMENTATION.md) is a more detailed list of the API endpoint callbacks.
5454

55-
## Developing
55+
## Development Set Up
5656

5757
1. Clone project
5858
2. Install `Node(with npm)`. See [package.json](/package.json) for current required versions
5959
3. Run `npm i`
60-
4. Make your code changes
60+
4. Make your code changes - [Follow Conventional Commits](#commit-message-requirements)
6161
5. Run `npm run build` to build the project
6262
6. [Link Project](#linking-for-development)
6363
7. Test your changes
64-
8. Update change log, translations, and documentation as needed
64+
8. Update translations and documentation as needed
6565
9. Open Pull Request
6666

67+
## Commit Message Requirements
68+
69+
_To make commits that trigger a package release, use `npx cz`, it will launch easy to follow commitizen prompts._
70+
71+
A new _MAJOR.MINOR.PATCH_ release will be generated if at least one of the following types are used, see [Conventional Commits Documentation](https://www.conventionalcommits.org/) for more specifics.
72+
* `fix:` -> PATCH bump
73+
* `feat:` -> MINOR bump
74+
* `<any_type>!:` -> MAJOR bump (any type with a ! after it, or a footer of `BREAKING CHANGE:`)
75+
6776
## Linking for Development
6877

6978
For developing this package locally, we suggest you use npm link to connect your local version of the package to your client app using the package.
@@ -79,6 +88,6 @@ Pull requests are welcome. Please open an issue first to discuss what you would
7988

8089
Make sure to add/update tests, translations, and documentation as appropriate.
8190

82-
## Changelog
91+
## Release Notes
8392

84-
View our changelog [here](./CHANGELOG.md)
93+
View our release notes on [npm](https://www.npmjs.com/package/@mxenabled/connect-widget)

0 commit comments

Comments
 (0)