1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix always releasing master as NPM package (#6763)

Signed-off-by: Sebastian Malton <sebastian@malton.name>

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-12-15 07:35:00 -08:00 committed by GitHub
parent 83d2b12cca
commit 15930d910f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -1,7 +1,16 @@
name: Publish NPM Package Release name: Publish NPM Package Release
on: on:
workflow_call: workflow_call:
inputs:
version:
required: true
type: string
workflow_dispatch: workflow_dispatch:
inputs:
version:
required: true
type: string
description: The version to release manually
jobs: jobs:
publish: publish:
name: Publish NPM Package Release name: Publish NPM Package Release
@ -14,6 +23,7 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
ref: ${{ inputs.version }}
- name: Using Node.js ${{ matrix.node-version }} - name: Using Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3 uses: actions/setup-node@v3

View File

@ -11,6 +11,8 @@ jobs:
name: Release name: Release
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release') }} if: ${{ github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release') }}
outputs:
version: ${{ steps.tagger.outputs.tagname }}
steps: steps:
- name: Checkout Release from lens - name: Checkout Release from lens
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -31,3 +33,6 @@ jobs:
publish-npm: publish-npm:
uses: ./.github/workflows/publish-release-npm.yml uses: ./.github/workflows/publish-release-npm.yml
needs: release needs: release
if: ${{ jobs.release.outputs.version != '' }}
with:
version: ${{ jobs.release.outputs.version }}