Skip to content

Commit

Permalink
chore: setup release workflow (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan authored Oct 12, 2024
1 parent 82eb283 commit c04392e
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This action will publish the package to npm and create a GitHub release.
name: Release

on:
# Run `npm run bump` to bump the version and create a git tag.
push:
tags:
- "v*"

workflow_dispatch:

permissions:
contents: write
id-token: write

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Pnpm
run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"

- name: Install Dependencies
run: pnpm install

- name: Publish
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.RSBUILD_PLUGIN_NPM_TOKEN }}

- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: "true"
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"lint": "biome check .",
"lint:write": "biome check . --write",
"prepare": "simple-git-hooks && npm run build",
"test": "playwright test"
"test": "playwright test",
"bump": "npx bumpp"
},
"simple-git-hooks": {
"pre-commit": "npx nano-staged"
Expand Down

0 comments on commit c04392e

Please sign in to comment.