Skip to content

Commit 7eed28b

Browse files
committed
ci(release): add force option
1 parent 0c93858 commit 7eed28b

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ on:
55
inputs:
66
bump:
77
description: 'Bump Type'
8-
required: true
98
type: choice
9+
required: true
1010
options:
1111
- (auto)
1212
- patch
@@ -16,6 +16,10 @@ on:
1616
description: 'Prerelease'
1717
type: boolean
1818
required: false
19+
force:
20+
description: 'Force Bump'
21+
type: boolean
22+
required: false
1923
dry-run:
2024
description: 'Dry Run'
2125
type: boolean
@@ -25,11 +29,12 @@ run-name: >-
2529
Release
2630
${{ inputs.bump && format('[🚀 {0}]', inputs.bump) || format('') }}
2731
${{ inputs.prerelease && format('[🧪 Prerelease]') || format('') }}
32+
${{ inputs.force && format('[⚡ Force]') || format('') }}
2833
${{ inputs.dry-run && format('[🚫 Dry Run]') || format('') }}
2934
3035
permissions:
31-
contents: write
3236
packages: read
37+
contents: write
3338

3439
concurrency: release
3540

@@ -68,12 +73,18 @@ jobs:
6873
if [[ "${{ inputs.prerelease }}" == "true" ]]; then
6974
ARGS+="--conventional-prerelease "
7075
ARGS+="${{ inputs.bump == '(auto)' && ' ' || format('pre{0}', inputs.bump) }} "
76+
if [[ "${{ inputs.force }}" == "true" ]]; then
77+
ARGS+="--force-publish "
78+
fi
7179
else
7280
ARGS+="${{ inputs.bump == '(auto)' && '--conventional-graduate' || inputs.bump }} "
81+
if [[ "${{ inputs.force }}" == "true" ]]; then
82+
ARGS+="--force-conventional-graduate "
83+
fi
7384
fi
7485
if [[ "${{ inputs.dry-run }}" == "true" ]]; then
7586
ARGS+="--dry-run "
7687
fi
7788
ARGS+="--yes "
78-
echo "$ARGS"
89+
echo "Running: pnpm ci:release $ARGS"
7990
bash -c "pnpm ci:release $ARGS"

0 commit comments

Comments
 (0)