Skip to content

Commit

Permalink
ci: add semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
Renato Pozzi committed Feb 12, 2024
1 parent 6a4a0ad commit 0fefde2
Show file tree
Hide file tree
Showing 4 changed files with 1,302 additions and 15 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release

on:
push:
branches:
- main
- dev

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false

- uses: pnpm/action-setup@v3
with:
version: 8

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

- name: Install dependencies
run: pnpm i

- name: Semantic Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm run lib:release
15 changes: 15 additions & 0 deletions libs/react-plock/.releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"branches": [
"main",
{
"name": "dev",
"prerelease": true
}
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
"@semantic-release/github"
]
}
3 changes: 2 additions & 1 deletion libs/react-plock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"lib:bump:dev": "changelogen --bump --prerelease dev",
"lib:publish": "changelogen --publish",
"lib:publish:dev": "npm publish react-plock --tag dev",
"lib:release": "changelogen --release",
"lib:release": "semantic-release",
"build": "tsup index.ts --dts --minify"
},
"bugs": {
Expand All @@ -38,6 +38,7 @@
"@types/react": "^18.0.28",
"changelogen": "^0.5.5",
"jest": "^29.4.3",
"semantic-release": "^22.0.12",
"ts-jest": "^29.0.5"
}
}
Loading

0 comments on commit 0fefde2

Please sign in to comment.