Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(workflow): setup release CI #6

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,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 Expand Up @@ -62,6 +63,7 @@
"packageManager": "[email protected]",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
"registry": "https://registry.npmjs.org/",
"provenance": true
}
}
Loading