From 28e48debb8191d9eb25aa59ae8fe301e6534cdfa Mon Sep 17 00:00:00 2001 From: MATSUDA Takashi Date: Tue, 7 Nov 2023 15:35:04 +0900 Subject: [PATCH] Create deploy.yml --- .github/workflows/deploy.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..e38cdbf --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,34 @@ +name: Deploy +on: + push: + release: + types: [published, prereleased] + workflow_dispatch: + +jobs: + upload-artifact: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install Node 18 + uses: actions/setup-node@v4 + with: + node-version: 18 + - name: Install vsce + run: npm install -g vsce + - name: Install dependencies + run: npm ci + - name: Run build + run: vsce package + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: extension + path: "*.vsix" + - name: Upload release artifact + if: ${{ github.event_name == 'release' }} + uses: shogo82148/actions-upload-release-asset@v1 + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: "*.vsix"