Skip to content

Commit

Permalink
chore: setup semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
saikrishna321 committed Jul 10, 2024
1 parent 9628418 commit f3ccf67
Show file tree
Hide file tree
Showing 5 changed files with 17,776 additions and 12,341 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Conventional Commits
on:
pull_request:


jobs:
lint:
name: https://www.conventionalcommits.org
runs-on: ubuntu-latest
steps:
- uses: beemojs/conventional-pr-action@v3
with:
config-preset: angular
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
30 changes: 15 additions & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package
name: Release

on:
release:
types: [created]
workflow_dispatch:
push:
branches: [ main ]

jobs:
publish-npm:
runs-on: ubuntu-latest
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build
- run: npm publish
node-version: lts/*
check-latest: true
- run: npm install --no-package-lock
name: Install dev dependencies
- run: npx semantic-release
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.npm_token }}
name: Release
37 changes: 37 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"plugins": [
["@semantic-release/commit-analyzer", {
"preset": "angular",
"releaseRules": [
{"type": "chore", "release": "patch"}
]
}],
["@semantic-release/release-notes-generator", {
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{"type": "feat", "section": "Features"},
{"type": "fix", "section": "Bug Fixes"},
{"type": "perf", "section": "Performance Improvements"},
{"type": "revert", "section": "Reverts"},
{"type": "chore", "section": "Miscellaneous Chores"},
{"type": "refactor", "section": "Code Refactoring"},
{"type": "docs", "section": "Documentation", "hidden": true},
{"type": "style", "section": "Styles", "hidden": true},
{"type": "test", "section": "Tests", "hidden": true},
{"type": "build", "section": "Build System", "hidden": true},
{"type": "ci", "section": "Continuous Integration", "hidden": true}
]
}
}],
["@semantic-release/changelog", {
"changelogFile": "CHANGELOG.md"
}],
"@semantic-release/npm",
["@semantic-release/git", {
"assets": ["docs", "package.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}],
"@semantic-release/github"
]
}
Loading

0 comments on commit f3ccf67

Please # to comment.