Skip to content

Commit

Permalink
Allow prerelease
Browse files Browse the repository at this point in the history
  • Loading branch information
9inpachi committed May 29, 2024
1 parent 526a848 commit 5e1c8e5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ on:
- premajor
- preminor
- prepatch
prerelease:
type: choice
description: If the release is a prerelease
default: no
options:
- no
- beta
- alpha

jobs:
publish-package:
Expand Down Expand Up @@ -53,7 +61,15 @@ jobs:
run: pnpm docs:build

- name: Publish package
if: "${{ inputs.prerelease == 'no' }}"
run: pnpm release --increment ${{ inputs.increment }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Prepublish package
if: "${{ inputs.prerelease != 'no' }}"
run: pnpm release ${{ inputs.increment }} --preRelease ${{ inputs.prerelease }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 5e1c8e5

Please sign in to comment.