Skip to content

Commit

Permalink
Merge pull request #813 from webdriverio-community/sm/ci-branch-prere…
Browse files Browse the repository at this point in the history
…lease

feat(CI): pre-release from branch
  • Loading branch information
goosewobbler authored Nov 4, 2024
2 parents 60d1b0a + 501b70c commit b04f303
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ name: Manual Pre-Release Publish
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch. Defaults to "main".'
required: true
default: 'main'
npmTag:
description: 'NPM tag. Leave blank to use the default "next" tag.'
description: 'NPM tag. Defaults to "next".'
required: true
default: 'next'
preReleaseName:
description: 'Pre-release name. This is used in the version string, e.g. "beta" for `7.0.0-beta.0`. Leave blank to use the default "next".'
description: 'Pre-release name. This is used in the version string, e.g. "beta" for `7.0.0-beta.0`. Defaults to "next".'
required: true
default: 'next'
preReleaseVersion:
Expand Down Expand Up @@ -38,7 +42,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: 'main'
ref: ${{inputs.branch}}
fetch-depth: 0
- uses: actions/setup-node@v4
with:
Expand All @@ -61,9 +65,9 @@ jobs:
run: |
pnpm run build
if [ "${{inputs.preReleaseVersion}}" == "existing" ]; then
pnpx tsx scripts/release.ts $DRY_RUN_ARG --preRelease=${{inputs.preReleaseName}} --npm.tag=${{inputs.npmTag}}
pnpx tsx scripts/release.ts $DRY_RUN_ARG --preRelease=${{inputs.preReleaseName}} --npm.tag=${{inputs.npmTag}} --no-git.requireupstream
else
pnpx tsx scripts/release.ts ${{inputs.preReleaseVersion}} $DRY_RUN_ARG --preRelease=${{inputs.preReleaseName}} --npm.tag=${{inputs.npmTag}}
pnpx tsx scripts/release.ts ${{inputs.preReleaseVersion}} $DRY_RUN_ARG --preRelease=${{inputs.preReleaseName}} --npm.tag=${{inputs.npmTag}} --no-git.requireupstream
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
inputs:
npmTag:
description: 'NPM tag. Leave blank to use the default "latest" tag.'
description: 'NPM tag. Defaults to "latest".'
required: true
default: 'latest'
releaseVersion:
Expand Down

0 comments on commit b04f303

Please sign in to comment.