Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: allow prereleases on publish workflow #4108

Merged
merged 1 commit into from
Jan 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading