Skip to content

Commit c348df2

Browse files
authored
ci: separate publishing steps
1 parent 6a635fd commit c348df2

File tree

1 file changed

+37
-9
lines changed

1 file changed

+37
-9
lines changed

.github/workflows/publish.yml

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
name: Deploy Extension
1212
jobs:
13-
deploy:
13+
build-vsix:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
@@ -27,23 +27,51 @@ jobs:
2727
with:
2828
name: shiny-vscode
2929
path: "shiny*.vsix"
30+
31+
publish-open-vsx:
32+
runs-on: ubuntu-latest
33+
if: ${{
34+
(github.event_name == 'push' && github.repository_owner == 'posit-dev') ||
35+
github.event.pull_request.head.repo.fork == false
36+
}}
37+
needs:
38+
- build-vsix
39+
steps:
40+
- uses: actions/checkout@v4
41+
- uses: actions/setup-node@v4
42+
with:
43+
node-version: "18.x"
44+
- run: yarn install --immutable --immutable-cache --check-cache
45+
46+
- name: Build Extension
47+
run: yarn vsix
3048

3149
- name: Publish to Open VSX Registry
3250
uses: HaaLeo/publish-vscode-extension@v1
33-
if: ${{
34-
(github.event_name == 'push' && github.repository_owner == 'posit-dev') ||
35-
github.event.pull_request.head.repo.fork == false
36-
}}
3751
with:
3852
pat: ${{ secrets.OPEN_VSX_TOKEN }}
3953
dryRun: ${{ !(github.event_name == 'push' && github.ref_type == 'tag') }}
54+
55+
publish-vscode-marketplace:
56+
runs-on: ubuntu-latest
57+
if: ${{
58+
(github.event_name == 'push' && github.repository_owner == 'posit-dev') ||
59+
github.event.pull_request.head.repo.fork == false
60+
}}
61+
needs:
62+
- build-vsix
63+
steps:
64+
- uses: actions/checkout@v4
65+
- uses: actions/setup-node@v4
66+
with:
67+
node-version: "18.x"
68+
- run: yarn install --immutable --immutable-cache --check-cache
4069

70+
- name: Build Extension
71+
run: yarn vsix
72+
4173
- name: Publish to Visual Studio Marketplace
4274
uses: HaaLeo/publish-vscode-extension@v1
43-
if: ${{
44-
(github.event_name == 'push' && github.repository_owner == 'posit-dev') ||
45-
github.event.pull_request.head.repo.fork == false
46-
}}
4775
with:
4876
pat: ${{ secrets.VSCE_PAT }}
4977
registryUrl: https://marketplace.visualstudio.com

0 commit comments

Comments
 (0)