From 7d4766f3e9d5fe68efd554aa81e6541ac7b5bfa9 Mon Sep 17 00:00:00 2001 From: Nicholas Schell Date: Fri, 15 May 2026 06:37:57 -0700 Subject: [PATCH] optional skip creating tag/release only perform version bump --- .github/workflows/npm-version-release.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/npm-version-release.yml b/.github/workflows/npm-version-release.yml index 02df5db..b130292 100644 --- a/.github/workflows/npm-version-release.yml +++ b/.github/workflows/npm-version-release.yml @@ -24,6 +24,10 @@ on: required: false type: boolean default: false + skip_tag: + required: false + type: boolean + description: Skip creation of tag/release outputs: oldVer: value: ${{ jobs.next-version.outputs.oldVer }} @@ -97,6 +101,7 @@ jobs: appPath: ${{ inputs.app_path }} branch: ${{ github.head_ref || github.ref_name }} semVer: ${{ steps.bump-version.outputs.semVer }} + skipTag: ${{ inputs.skip_tag }} with: github-token: ${{ inputs.use_workflow_token != true && steps.app-token.outputs.token || secrets.GITHUB_TOKEN }} result-encoding: string @@ -108,6 +113,7 @@ jobs: const appPath = (process.env.appPath || '').replace(/^\.?\/+/, '').replace(/\/$/, ''); const semVer = process.env.semVer; + const skipTag = process.env.skipTag === 'true'; const filePath = (name) => appPath ? `${appPath}/${name}` : name; @@ -209,6 +215,12 @@ jobs: }); console.log('fast-forward ${branch} ref', newRef); + core.setOutput('newHeadSha', newCommitSha); + + if (skipTag) { + return; + } + // 6) Create a tag and release const { data: release } = await github.rest.repos.createRelease({ owner: context.repo.owner, @@ -221,8 +233,6 @@ jobs: }); console.log('created github release:', release); - core.setOutput('newHeadSha', newCommitSha); - function appendFileContents(filePath, isOptional, fileArr) { if (!fs.existsSync(filePath)) { if (isOptional === true) {