Skip to content

Commit

Permalink
build: GH action for publish vscode extension
Browse files Browse the repository at this point in the history
  • Loading branch information
aljazerzen committed Jul 13, 2024
1 parent 2b3bc3e commit 683b045
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on:
push:
tags:
- v*

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

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
- run: npm install

- name: Publish vsce --prerelease
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-')
run: vsce publish --prerelease
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}

- name: Publish vsce
if: startsWith(github.ref, 'refs/tags/v') && not contains(github.ref, '-')
run: vsce publish
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
"@types/node": "^18.14.6",
"@typescript-eslint/eslint-plugin": "^7.1.0",
"@typescript-eslint/parser": "^7.1.0",
"@vscode/vsce": "^2.30.0",
"eslint": "^8.57.0",
"syntaxdev": "^0.1.2",
"typescript": "^5.3.3"
Expand Down

0 comments on commit 683b045

Please sign in to comment.