File tree Expand file tree Collapse file tree 1 file changed +2
-30
lines changed
Expand file tree Collapse file tree 1 file changed +2
-30
lines changed Original file line number Diff line number Diff line change @@ -3,26 +3,11 @@ name: Release
33on :
44 workflow_dispatch :
55 inputs :
6- releaseType :
7- description : ' Release type (patch, minor, major)'
8- required : false
9- default : ' auto'
10- type : choice
11- options :
12- - auto
13- - patch
14- - minor
15- - major
166 dryRun :
177 description : ' Dry run (no actual release)'
188 required : false
199 default : false
2010 type : boolean
21- preRelease :
22- description : ' Pre-release identifier (beta, alpha, rc, etc.)'
23- required : false
24- default : ' '
25- type : string
2611 repository_dispatch :
2712 types : [release-trigger]
2813
8166 env :
8267 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
8368 NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
84- RELEASE_TYPE : ${{ github.event.inputs.releaseType || 'auto' }}
8569 DRY_RUN : ${{ github.event.inputs.dryRun || 'false' }}
86- PRE_RELEASE : ${{ github.event.inputs.preRelease || '' }}
8770 run : |
8871 EXTRA_ARGS=""
8972
9275 EXTRA_ARGS="--dry-run"
9376 fi
9477
95- if [ -n "$PRE_RELEASE" ]; then
96- echo "Running pre-release: $PRE_RELEASE"
97- npx semantic-release --prerelease "$PRE_RELEASE" $EXTRA_ARGS
98- EXIT_CODE=$?
99- elif [ "$RELEASE_TYPE" = "auto" ]; then
100- echo "Running auto release"
101- npx semantic-release $EXTRA_ARGS
102- EXIT_CODE=$?
103- else
104- echo "Running release with type: $RELEASE_TYPE"
105- npx semantic-release --release-as "$RELEASE_TYPE" $EXTRA_ARGS
106- EXIT_CODE=$?
107- fi
78+ npx semantic-release $EXTRA_ARGS
79+ EXIT_CODE=$?
10880
10981 if [ "$DRY_RUN" != "true" ] && [ $EXIT_CODE -eq 0 ]; then
11082 echo "released=true" >> "$GITHUB_OUTPUT"
You can’t perform that action at this time.
0 commit comments