Skip to content

Commit b4564cf

Browse files
committed
ci: update
1 parent 294d4b5 commit b4564cf

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

.github/workflows/release.yml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
name: ⚠️ Release
22
on:
33
workflow_dispatch:
4-
push:
5-
branches: [master]
6-
paths:
7-
- 'projects/**'
4+
inputs:
5+
forcePush:
6+
type: boolean
7+
required: false
8+
description: --force-publish package
9+
mode:
10+
type: choice
11+
description: force package to be versioned (depend --force-publish)
12+
required: false
13+
default: minor
14+
options:
15+
- patch
16+
- minor
17+
- major
18+
- prerelease
819

920
jobs:
1021
run-release:
@@ -26,6 +37,17 @@ jobs:
2637
with:
2738
token: ${{ secrets.NPM_TOKEN }}
2839

29-
- run: npx release-it --increment --ci
40+
- run: |
41+
if [[ "${{ github.event.inputs.forcePush }}" == "true" ]]; then
42+
43+
if [[ "${{ github.event.inputs.mode }}" != "prerelease" ]]; then
44+
npx release-it "${{ github.event.inputs.mode }}" --increment --ci
45+
else
46+
npx release-it --preRelease=alpha --ci
47+
fi
48+
49+
else
50+
npx release-it --increment --ci
51+
fi
3052
env:
3153
GITHUB_TOKEN: ${{ secrets.ANGULAR_RU_BOT_PAT }}

0 commit comments

Comments
 (0)