Skip to content

Commit

Permalink
(feat): Release Github Action
Browse files Browse the repository at this point in the history
  • Loading branch information
samyakkkk committed Mar 26, 2024
1 parent 6b01c47 commit 63e33b2
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/deploy-vscode.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout commit
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: Cache NPM
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/vscode/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: |
cd vscode
npm ci
- name: Publish Release
if: startsWith(github.ref, 'refs/tags/') && github.event.release.prerelease == false
run: |
cd vscode
npx vsce publish
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}

- name: Publish Pre-Release
if: startsWith(github.ref, 'refs/tags/') && github.event.release.prerelease == true
run: |
cd vscode
npx vsce publish --pre-release
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}

0 comments on commit 63e33b2

Please sign in to comment.