Skip to content

Commit

Permalink
ci: clean up publish actions (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
gadenbuie committed May 29, 2024
1 parent c348df2 commit 10fa5f0
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: "18.x"

- run: yarn install --immutable --immutable-cache --check-cache

- name: Lint Extension
run: yarn lint

- name: Build Extension
run: yarn vsix

Expand All @@ -27,52 +31,48 @@ jobs:
with:
name: shiny-vscode
path: "shiny*.vsix"

publish-open-vsx:
runs-on: ubuntu-latest
if: ${{
(github.event_name == 'push' && github.repository_owner == 'posit-dev') ||
github.event.pull_request.head.repo.fork == false
}}
if: |
github.event_name == 'push' &&
github.ref_type == 'tag' &&
github.repository_owner == 'posit-dev'
needs:
- build-vsix
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18.x"
- run: yarn install --immutable --immutable-cache --check-cache

- name: Build Extension
run: yarn vsix
- run: yarn install --immutable --immutable-cache --check-cache

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

publish-vscode-marketplace:
runs-on: ubuntu-latest
if: ${{
(github.event_name == 'push' && github.repository_owner == 'posit-dev') ||
github.event.pull_request.head.repo.fork == false
}}
if: |
github.event_name == 'push' &&
github.ref_type == 'tag' &&
github.repository_owner == 'posit-dev'
needs:
- build-vsix
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18.x"

- run: yarn install --immutable --immutable-cache --check-cache

- name: Build Extension
run: yarn vsix

- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VSCE_PAT }}
skipDuplicate: true
registryUrl: https://marketplace.visualstudio.com
dryRun: ${{ !(github.event_name == 'push' && github.ref_type == 'tag') }}

0 comments on commit 10fa5f0

Please sign in to comment.