Skip to content

Commit

Permalink
ci: fix release yml
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Sep 4, 2024
1 parent faf1edc commit 7fd23e5
Showing 1 changed file with 13 additions and 22 deletions.
35 changes: 13 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
name: ⚠️ Release
on:
workflow_dispatch:
inputs:
forcePush:
type: boolean
required: false
description: --force-publish package
mode:
type: choice
description: force package to be versioned (depend --force-publish)
required: false
default: minor
options:
- patch
- minor
- major
- prerelease
mode:
type: choice
description: release mode
required: true
default: minor
options:
- patch
- minor
- major
- prerelease

jobs:
run-release:
Expand Down Expand Up @@ -43,14 +38,10 @@ jobs:
- run: npx ts-node .scripts/validate-version.ts

- run: |
if [[ "${{ github.event.inputs.forcePush }}" == "true" ]]; then
if [[ "${{ github.event.inputs.mode }}" != "prerelease" ]]; then
npx release-it "${{ github.event.inputs.mode }}" --increment --ci --github.release
else
npx release-it --preRelease=alpha --ci
fi
if [[ "${{ github.event.inputs.mode }}" != "prerelease" ]]; then
npx release-it "${{ github.event.inputs.mode }}" --increment --ci --github.release
else
npx release-it --increment --ci --github.release
npx release-it --preRelease=alpha --ci
fi
- id: info
Expand Down

0 comments on commit 7fd23e5

Please sign in to comment.