From 4df999639c48fef4b86199dd7aced4a6e5575d2e Mon Sep 17 00:00:00 2001 From: Atomie CHEN Date: Sun, 5 May 2024 17:24:59 +0800 Subject: [PATCH] build: update action to use manual trigger --- .github/workflows/test_and_publish.yml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test_and_publish.yml b/.github/workflows/test_and_publish.yml index fac8d5d..92a08b1 100644 --- a/.github/workflows/test_and_publish.yml +++ b/.github/workflows/test_and_publish.yml @@ -2,11 +2,21 @@ on: push: branches: - main - tags: - - v* - release: - types: - - created + # tags: + # - v* + # release: + # types: + # - created + workflow_dispatch: + inputs: + publish_vse: + type: boolean + default: false + description: publish to marketplace + publish_github: + type: boolean + default: false + description: publish to GitHub release jobs: build: @@ -26,8 +36,8 @@ jobs: if: runner.os == 'Linux' - run: npm test if: runner.os != 'Linux' - - name: Publish - if: success() && startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest' + - name: Publish to marketplace + if: success() && startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest' && ${{ inputs.publish_vse }} run: npm run deploy env: VSCE_PAT: ${{ secrets.VSCE_PAT }}