Skip to content

Commit

Permalink
ci: release inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexer Wang committed May 2, 2023
1 parent fd2550b commit dbe3ccc
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ on:
branches:
- main
workflow_dispatch:
inputs:
increment:
type: choice
description: Release version increment
options:
- auto
- patch
- minor
- major
default: auto
dry:
type: boolean
description: dry-run
default: false

permissions:
contents: write
Expand Down Expand Up @@ -35,6 +49,8 @@ jobs:
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Run release
run: pnpm run release --ci
run: pnpm run release $ARG_INCREMENT --ci --verbose $ARG_DRY_RUN
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ARG_INCREMENT: ${{ github.event.inputs.increment == 'auto' && '' || github.event.inputs.increment }}
ARG_DRY_RUN: ${{ github.event.inputs.dry == 'true' && '--dry-run' || '' }}

0 comments on commit dbe3ccc

Please sign in to comment.