Skip to content

Commit

Permalink
chore: add release library and workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
herberttn committed Jul 3, 2023
1 parent b4670aa commit e1dda04
Show file tree
Hide file tree
Showing 4 changed files with 6,392 additions and 642 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: release

on:
workflow_dispatch:

env:
node: 20

permissions:
contents: write
id-token: write
issues: write
pull-requests: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@v3
with:
cache: npm
node-version: ${{ env.node }}
- run: npm ci
- run: npm audit signatures
- run: npm run release -- --npm.skipChecks
env:
GITHUB_TOKEN: ${{ github.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
33 changes: 33 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"git": {
"commit": true,
"commitMessage": "v${version}",
"push": true,
"requireBranch": "main",
"requireCommits": true,
"requireCommitsFail": true,
"tag": true,
"tagAnnotation": "v${version}"
},
"github": {
"comments": true,
"release": true,
"releaseName": "v${version}",
"web": false
},
"hooks": {
"before:init": "npm run typecheck",
"after:bump": "npm run build"
},
"npm": {
"publish": true
},
"plugins": {
"@release-it/conventional-changelog": {
"infile": "CHANGELOG.md",
"preset": {
"name": "conventionalcommits"
}
}
}
}
Loading

0 comments on commit e1dda04

Please sign in to comment.