Skip to content

Commit

Permalink
ci: allow prereleases on publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mvidalgarcia committed Jan 4, 2024
1 parent e0d4e50 commit 7751704
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Publish
run-name: Publish, prerelease:${{ inputs.prerelease }}, dry-run:${{ inputs.dryrun }}

on:
workflow_dispatch:
Expand All @@ -8,6 +9,11 @@ on:
required: false
default: false
type: boolean
prerelease:
description: "Prerelease"
required: false
default: false
type: boolean

jobs:
publish:
Expand Down Expand Up @@ -41,7 +47,11 @@ jobs:
- name: Dry run
if: ${{ github.event.inputs.dryrun == 'true' }}
run: |
yarn lerna version --no-private --no-push --no-git-tag-version --yes
if ${{ github.event.inputs.prerelease == 'true' }}; then
yarn lerna version --no-private --no-push --no-git-tag-version --conventional-prerelease --yes
else
yarn lerna version --no-private --no-push --no-git-tag-version --yes
fi
git diff
yarn zx scripts/post-changelog.mjs --dry
Expand All @@ -56,7 +66,11 @@ jobs:
echo "access=public" >> ~/.npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
echo "//registry.npmjs.org/:always-auth=true" >> ~/.npmrc
yarn lerna publish --no-private --conventional-commits --create-release github --ignore-prepublish --yes
if ${{ github.event.inputs.prerelease == 'true' }}; then
yarn lerna publish --no-private --conventional-commits --create-release github --ignore-prepublish --conventional-prerelease --yes
else
yarn lerna publish --no-private --conventional-commits --create-release github --ignore-prepublish --yes
fi
yarn docs changelog
git add docs/src/data/log.md && git commit -m "docs: update changelog" && git push
yarn zx scripts/post-changelog.mjs

0 comments on commit 7751704

Please sign in to comment.