From 7751704e9d05d42efaaa07bdefc9064ae2321183 Mon Sep 17 00:00:00 2001 From: Marco Vidal Garcia Date: Tue, 24 Oct 2023 10:22:04 +0200 Subject: [PATCH] ci: allow prereleases on publish workflow --- .github/workflows/publish.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index de39d50ef5..44b26bce70 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,5 @@ name: Publish +run-name: Publish, prerelease:${{ inputs.prerelease }}, dry-run:${{ inputs.dryrun }} on: workflow_dispatch: @@ -8,6 +9,11 @@ on: required: false default: false type: boolean + prerelease: + description: "Prerelease" + required: false + default: false + type: boolean jobs: publish: @@ -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 @@ -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