Skip to content

Commit

Permalink
ci: update
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Jul 6, 2024
1 parent 294d4b5 commit b4564cf
Showing 1 changed file with 27 additions and 5 deletions.
32 changes: 27 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
name: ⚠️ Release
on:
workflow_dispatch:
push:
branches: [master]
paths:
- 'projects/**'
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

jobs:
run-release:
Expand All @@ -26,6 +37,17 @@ jobs:
with:
token: ${{ secrets.NPM_TOKEN }}

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

0 comments on commit b4564cf

Please sign in to comment.