Skip to content

Commit

Permalink
ci: specify version type (premajor, preminor, prepatch, prerelease) i…
Browse files Browse the repository at this point in the history
…n pre-release actions
  • Loading branch information
MartinWeb authored Nov 22, 2023
1 parent b0578f3 commit 22e0ace
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/pre-release-publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
name: Publish pre-release

on: workflow_dispatch
# No push trigger events because PAT, use here, will do a recursive workflow run
on:
workflow_dispatch:
inputs:
versionType:
required: true
type: choice
options:
- premajor
- preminor
- prepatch
- prerelease

env:
NODE_VERSION: 16.x
Expand All @@ -26,12 +35,12 @@ jobs:
- run: |
git config user.name "Build-CI"
git config user.email [email protected]
- name: Create new pre release
run: npx lerna version prerelease --exact --force-publish --yes --no-push
- name: Create new ${{ inputs.versionType }} release
run: npx lerna version ${{ inputs.versionType }} --exact --force-publish --yes --no-push
- run: |
git push
git push --tags origin
- name: Publish pre-release packages to npm
- name: Publish ${{ inputs.versionType }} release packages to npm
run: npx lerna publish from-package --dist-tag next --yes --registry https://registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 22e0ace

Please sign in to comment.