Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: always build and upload the vsix artifact #32

Merged
merged 2 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
on:
push:
tags:
- "v[0-9]*"
- 'v[0-9]*'
branches:
- "main"
- 'main'
pull_request:
branches:
- "main"
- 'main'

name: Deploy Extension
jobs:
Expand All @@ -16,21 +16,29 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18.x"
node-version: '18.x'
- run: yarn install --immutable --immutable-cache --check-cache

- name: Build Extension
run: yarn vsix

- name: Upload extension to Actions Artifact
uses: actions/upload-artifact@v3
with:
name: shiny-vscode
path: 'shiny*.vsix'

- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v1
if: ${{ github.repository_owner == 'posit-dev' }}
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
dryRun: ${{ !(github.event_name == 'push' && github.ref_type == 'tag') }}

- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
if: ${{ github.repository_owner == 'posit-dev' }}
with:
pat: ${{ secrets.VSCE_PAT }}
registryUrl: https://marketplace.visualstudio.com
dryRun: ${{ !(github.event_name == 'push' && github.ref_type == 'tag') }}
- name: Upload extension to Actions Artifact
uses: actions/upload-artifact@v3
with:
name: shiny-vscode
path: "shiny*.vsix"
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@
"watch": "tsc -watch -p ./",
"pretest": "yarn run compile && yarn run lint",
"lint": "eslint src --ext ts",
"test": "node ./out/test/runTest.js"
"test": "node ./out/test/runTest.js",
"vsix": "npx @vscode/vsce package"
},
"devDependencies": {
"@types/glob": "^8.1.0",
Expand Down
Loading