-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(semantic-release): set up Semantic-Release for Auto Package Buil…
…d & Release - We setup the semantic-release package and configured our repo to use Conventional Commits using Commitizen. We Configured semantic-release to release the build automatically to NPM and GitHub, Generate Release Notes, Update Changelog file, and maintain the Git Tags / Semantic Versioning of the Package. - We also setup github Worlflow for the auto NPM release process for semantic-release re #1
- Loading branch information
1 parent
992dd45
commit b1d148a
Showing
8 changed files
with
14,580 additions
and
2,122 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,60 @@ | ||
{ | ||
"path": "./node_modules/cz-conventional-changelog", | ||
"types": { | ||
"feat": { | ||
"description": "A new feature", | ||
"title": "Features", | ||
"emoji": "✨" | ||
}, | ||
"fix": { | ||
"description": "A bug fix", | ||
"title": "Bug Fixes", | ||
"emoji": "🐛" | ||
}, | ||
"docs": { | ||
"description": "Documentation only changes", | ||
"title": "Documentation", | ||
"emoji": "📚" | ||
}, | ||
"style": { | ||
"description": "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)", | ||
"title": "Styles", | ||
"emoji": "🎨" | ||
}, | ||
"refactor": { | ||
"description": "A code change that neither fixes a bug nor adds a feature", | ||
"title": "Code Refactoring", | ||
"emoji": "♻️" | ||
}, | ||
"perf": { | ||
"description": "A code change that improves performance", | ||
"title": "Performance Improvements", | ||
"emoji": "🚀" | ||
}, | ||
"test": { | ||
"description": "Adding missing tests or correcting existing tests", | ||
"title": "Tests", | ||
"emoji": "🚨" | ||
}, | ||
"build": { | ||
"description": "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)", | ||
"title": "Builds", | ||
"emoji": "🛠" | ||
}, | ||
"ci": { | ||
"description": "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)", | ||
"title": "Continuous Integrations", | ||
"emoji": "⚙️" | ||
}, | ||
"chore": { | ||
"description": "Other changes that don't modify src or test files", | ||
"title": "Chores", | ||
"emoji": "♻️" | ||
}, | ||
"revert": { | ||
"description": "Reverts a previous commit", | ||
"title": "Reverts", | ||
"emoji": "⏪️" | ||
} | ||
} | ||
} |
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,64 @@ | ||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: NodeJS CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: "*" | ||
|
||
permissions: | ||
contents: read # for checkout | ||
|
||
jobs: | ||
# quality: | ||
# runs-on: ${{ matrix.os }} | ||
|
||
# strategy: | ||
# matrix: | ||
# node-version: [10.x, 12.x, 14.x, 15.x] | ||
# os: [ubuntu-latest, windows-latest] | ||
# # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - name: Use Node.js ${{ matrix.node-version }} | ||
# uses: actions/setup-node@v2 | ||
# with: | ||
# node-version: ${{ matrix.node-version }} | ||
# - run: npm ci | ||
# - run: npm test | ||
|
||
release: | ||
runs-on: ${{ matrix.os }} | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
# needs: [quality] | ||
|
||
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 | ||
id-token: write # to enable use of OIDC for npm provenance | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
# os: [ubuntu-22.04, windows-latest] | ||
os: [ubuntu-22.04] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use NodeJS ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Installing Dependencies | ||
run: npm ci | ||
- name: Release | ||
run: npm run semantic-release | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_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 @@ | ||
configs/commit.hbs |
Empty file.
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,73 @@ | ||
✅{{#if scope}} **{{scope}}:** | ||
{{~/if}} {{#if subject}} | ||
{{~subject}} | ||
{{~else}} | ||
{{~header}} | ||
{{~/if}} | ||
|
||
{{~!-- commit link --}} {{#if @root.linkReferences~}} | ||
([{{shortHash}}]( | ||
{{~#if @root.repository}} | ||
{{~#if @root.host}} | ||
{{~@root.host}}/ | ||
{{~/if}} | ||
{{~#if @root.owner}} | ||
{{~@root.owner}}/ | ||
{{~/if}} | ||
{{~@root.repository}} | ||
{{~else}} | ||
{{~@root.repoUrl}} | ||
{{~/if}}/ | ||
{{~@root.commit}}/{{hash}})) | ||
{{~else}} | ||
{{~shortHash}} | ||
{{~/if}} | ||
|
||
{{~!-- commit references --}} | ||
{{~#if references~}} | ||
, closes | ||
{{~#each references}} {{#if @root.linkReferences~}} | ||
[ | ||
{{~#if this.owner}} | ||
{{~this.owner}}/ | ||
{{~/if}} | ||
{{~this.repository}}#{{this.issue}}]( | ||
{{~#if @root.repository}} | ||
{{~#if @root.host}} | ||
{{~@root.host}}/ | ||
{{~/if}} | ||
{{~#if this.repository}} | ||
{{~#if this.owner}} | ||
{{~this.owner}}/ | ||
{{~/if}} | ||
{{~this.repository}} | ||
{{~else}} | ||
{{~#if @root.owner}} | ||
{{~@root.owner}}/ | ||
{{~/if}} | ||
{{~@root.repository}} | ||
{{~/if}} | ||
{{~else}} | ||
{{~@root.repoUrl}} | ||
{{~/if}}/ | ||
{{~@root.issue}}/{{this.issue}}) | ||
{{~else}} | ||
{{~#if this.owner}} | ||
{{~this.owner}}/ | ||
{{~/if}} | ||
{{~this.repository}}#{{this.issue}} | ||
{{~/if}}{{/each}} | ||
{{~/if}} | ||
|
||
{{~#if body}} | ||
{{{{raw}}}} | ||
|
||
{{{{/raw}}}} | ||
|
||
{{body}} <br/><br/> | ||
|
||
{{~/if}} | ||
|
||
{{{{raw}}}} | ||
|
||
{{{{/raw}}}} |
Oops, something went wrong.