Skip to content

Commit

Permalink
chore: add release-it fixed version prompt in CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed May 16, 2024
1 parent 781c164 commit 008b7ab
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
type: boolean
required: false
description: Dry-Run
version:
description: 'Fixed Version'
required: false
type: string

permissions:
contents: write
Expand Down Expand Up @@ -79,8 +83,20 @@ jobs:
name: 'OTP to publish package'
description: 'OTP from authenticator app'
- name: Fixed Version Release
if: ${{ inputs.version != '' }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
npm whoami
npx release-it ${{ inputs.version }} --ci --dry-run --plugins.'@release-it/conventional-changelog'.ignoreRecommendedBump=false
- name: GitHub Release 🏷️ / NPM Publish 📦
if: ${{ inputs.dryrun != true }}
if: ${{ inputs.dryrun != true && inputs.version == '' }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 008b7ab

Please sign in to comment.