diff --git a/.github/workflows/publish-release-npm.yml b/.github/workflows/publish-release-npm.yml index 4b478a70ef..8dbf9f52ba 100644 --- a/.github/workflows/publish-release-npm.yml +++ b/.github/workflows/publish-release-npm.yml @@ -1,7 +1,16 @@ name: Publish NPM Package Release on: workflow_call: + inputs: + version: + required: true + type: string workflow_dispatch: + inputs: + version: + required: true + type: string + description: The version to release manually jobs: publish: name: Publish NPM Package Release @@ -14,6 +23,7 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 + ref: ${{ inputs.version }} - name: Using Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 28b1a14bbd..ab7ee4c273 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,6 +11,8 @@ jobs: name: Release runs-on: ubuntu-latest if: ${{ github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release') }} + outputs: + version: ${{ steps.tagger.outputs.tagname }} steps: - name: Checkout Release from lens uses: actions/checkout@v3 @@ -31,3 +33,6 @@ jobs: publish-npm: uses: ./.github/workflows/publish-release-npm.yml needs: release + if: ${{ jobs.release.outputs.version != '' }} + with: + version: ${{ jobs.release.outputs.version }}