Skip to content

Commit

Permalink
ci: semantic release github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
M4RC0Sx committed Sep 30, 2023
1 parent 797e03d commit 357dadf
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: release
on:
push:
branches: [master]

jobs:
release:
name: Release
permissions:
id-token: write # to enable NPM provenance
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "18"

- name: Install semantic-release
run: npm install -g semantic-release @semantic-release/github @semantic-release/changelog conventional-changelog-conventionalcommits @semantic-release/commit-analyzer @semantic-release/git @semantic-release/release-notes-generator @semantic-release/npm

- name: Publish to NPM
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
68 changes: 68 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"branches": [
"master",
"next"
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"releaseRules": [
{
"type": "docs",
"release": "patch"
},
{
"type": "refactor",
"release": "patch"
},
{
"type": "style",
"release": "patch"
},
{
"type": "ci",
"release": "patch"
},
{
"type": "test",
"release": "patch"
},
{
"type": "build",
"release": "patch"
},
{
"type": "chore",
"release": "patch"
}
]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/changelog",
{
"changelogTitle": "# passport-keycloak-jwt-introspect - Changelog"
}
],
"@semantic-release/github",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md",
"package.json"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}

0 comments on commit 357dadf

Please sign in to comment.