Skip to content

Commit

Permalink
Fix publishing job for VSCode Extension
Browse files Browse the repository at this point in the history
  • Loading branch information
danielelisi committed Jan 26, 2022
1 parent 05e64c6 commit 5865ce0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/vscode-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,14 @@ jobs:
matrix:
os:
- ubuntu-latest
# TODO: Uncomment once we make repo public
## private repos have usage limits for github hosted runners
# - macos-latest
# - windows-latest
- macos-latest
- windows-latest
defaults:
run:
working-directory: ${{ env.VSCODE_DIR }}
outputs:
artifactFilename: ${{ steps.setArtifactFilename.outputs.filename }}
vsixPath: ${{ steps.packageExtension.outputs.vsixPath }}
steps:
- name: Checkout Source
uses: actions/checkout@v2
Expand All @@ -59,15 +58,17 @@ jobs:
run: xvfb-run -a npm test
if: runner.os == 'Linux'
- name: Package VSCode Extension
if: runner.os == 'Linux'
id: packageExtension
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: stub
dryRun: true
packagePath: ${{ env.VSCODE_DIR }}
- id: setArtifactFilename
run: echo "::set-output name=filename::taqueria-vscode-${{ github.head_ref || github.ref_name }}-${{ runner.os }}.vsix"
run: echo "::set-output name=filename::taqueria-vscode-${{ github.head_ref || github.ref_name }}-${{ runner.os }}"
- name: Upload Extension Package as Artifact
if: runner.os == 'Linux'
uses: actions/upload-artifact@v2
with:
name: ${{ steps.setArtifactFilename.outputs.filename }}
Expand All @@ -76,12 +77,14 @@ jobs:

publish-marketplace:
name: Publish VSCode Extension
# TODO: uncomment before merging to master
# if: github.ref_type == 'tag'
if: github.ref_type == 'tag'
needs:
- lint-test-build
runs-on: ubuntu-latest
timeout-minutes: 10
defaults:
run:
working-directory: ${{ env.VSCODE_DIR }}
steps:
- name: Checkout Source
uses: actions/checkout@v2
Expand All @@ -91,15 +94,15 @@ jobs:
node-version: 16
- name: Install Dependencies
run: npm ci
working-directory: ${{ env.VSCODE_DIR }}
- name: Download Build Artifact
uses: actions/download-artifact@v2
with:
name: ${{ needs.lint-test-build.outputs.artifactFilename }}
path: ${{ env.VSCODE_DIR }}
- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VSCE_PAT }}
extensionFile: ${{ needs.lint-test-build.outputs.artifactFilename }}
extensionFile: ${{ needs.lint-test-build.outputs.vsixPath }}
registryUrl: https://marketplace.visualstudio.com
preRelease: true
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions taqueria-vscode-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
},
"author": "ECAD Labs",
"license": "Apache-2.0",
"icon": "images/taqueria-icon.png",
"repository": {
"type": "git",
"url": "git+https://github.com/ecadlabs/taqueria.git"
Expand Down

0 comments on commit 5865ce0

Please sign in to comment.