Skip to content

Commit

Permalink
ci: adding initial configuration for semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrorezende committed Jan 8, 2025
1 parent 58b430c commit 1bc8ebb
Show file tree
Hide file tree
Showing 4 changed files with 2,717 additions and 45 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release
on:
push:
branches:
- main

permissions:
contents: read # for checkout

jobs:
release:
name: Release
runs-on: ubuntu-latest
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
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Install dependencies
run: npm clean-install
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
71 changes: 71 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"extends": "semantic-release-monorepo",
"release": {
"branches": ["main"]
},
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "angular",
"releaseRules": [
{
"type": "build",
"release": "patch"
},
{
"type": "chore",
"release": "patch"
},
{
"type": "deps",
"release": "patch"
},
{
"type": "docs",
"release": "patch"
},
{
"type": "fix",
"release": "patch"
},
{
"type": "perf",
"release": "patch"
},
{
"type": "refactor",
"release": "patch"
},
{
"type": "revert",
"release": "patch"
},
{
"type": "style",
"release": "patch"
},
{
"type": "test",
"release": "patch"
},
{
"type": "ci",
"release": "patch"
},
{
"type": "feat",
"release": "minor"
},
{
"type": "breaking",
"release": "major"
}
],
"parserOpts": {
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES"]
}
}
]
]
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"devDependencies": {
"@chain-registry/types": "^0.45.80",
"@release-it/conventional-changelog": "^8.0.1",
"@semantic-release/commit-analyzer": "^13.0.1",
"@typescript-eslint/eslint-plugin": "^8.4.0",
"@typescript-eslint/parser": "^8.4.0",
"eslint": "^8.57.0",
Expand All @@ -37,6 +38,8 @@
"prettier": "^3.3.3",
"prettier-plugin-organize-imports": "^3.2.4",
"release-it": "^17.0.1",
"semantic-release": "^24.2.1",
"semantic-release-monorepo": "^8.0.2",
"stream-browserify": "^3.0.0",
"typescript": "^5.5.4",
"vite-plugin-checker": "^0.6.4",
Expand Down
Loading

0 comments on commit 1bc8ebb

Please sign in to comment.