-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: specify version type (premajor, preminor, prepatch, prerelease) i…
…n pre-release actions
- Loading branch information
Showing
1 changed file
with
14 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
@@ -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 }} |