Skip to content

Commit

Permalink
feat(release): added possibility to specify the release type'
Browse files Browse the repository at this point in the history
ISSUES CLOSED: #959
  • Loading branch information
dsebastien committed Oct 11, 2024
1 parent 919b417 commit ba87f24
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@ name: Release

concurrency: release

# Manual workflow
on: workflow_dispatch
# Manual workflow with optional release type input
on:
workflow_dispatch:
inputs:
release_type:
description: 'Release type (patch, minor, major)'
required: false
type: choice
options:
- patch
- minor
- major

permissions:
actions: read
Expand Down Expand Up @@ -35,7 +45,13 @@ jobs:
git switch --create release-${GITHUB_SHA}
git push --set-upstream origin release-${GITHUB_SHA}
- uses: nrwl/nx-set-shas@v4
- run: NX_NO_CLOUD=true && npm run release
- name: Run release
run: |
if [ -n "${{ github.event.inputs.release_type }}" ]; then
NX_NO_CLOUD=true && npm run release ${{ github.event.inputs.release_type }}
else
NX_NO_CLOUD=true && npm run release
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down

0 comments on commit ba87f24

Please sign in to comment.