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: update release workflow #11

Merged
merged 1 commit into from
Nov 4, 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
69 changes: 18 additions & 51 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,21 @@
name: Release Full
# This action will publish the package to npm and create a GitHub release.
name: Release

on:
workflow_dispatch:
inputs:
version:
type: choice
description: "Release Version Type"
required: true
default: "patch"
options:
- major
- premajor
- minor
- preminor
- patch
- prepatch
- prerelease

tag:
type: choice
description: "Release Npm Tag"
required: true
default: "latest"
options:
- canary
- nightly
- latest
- beta
- alpha
# Run `npm run bump` to bump the version and create a git tag.
push:
tags:
- "v*"

dry_run:
type: boolean
description: "DryRun release"
required: true
default: false
workflow_dispatch:

permissions:
# To publish packages with provenance
contents: write
id-token: write

jobs:
release:
name: Release
permissions:
contents: write
# To publish packages with provenance
id-token: write
publish:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -58,19 +26,18 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: "pnpm"

- name: Install Dependencies
run: pnpm install

# - name: Run Test
# run: pnpm run test
- name: Publish
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.RSBUILD_PLUGIN_NPM_TOKEN }}

- name: Try release to npm
run: pnpm run release
env:
DRY_RUN: ${{ inputs.dry_run }}
TAG: ${{ inputs.tag }}
VERSION: ${{ inputs.version }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: "true"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"build:watch": "modern build -w",
"lint": "biome check",
"lint:fix": "biome check --write --unsafe",
"release": "node ./scripts/release.mjs"
"bump": "npx bumpp"
},
"dependencies": {
"framer-motion": "^11.3.4"
Expand Down
80 changes: 0 additions & 80 deletions scripts/release.mjs

This file was deleted.