Skip to content

Commit

Permalink
Fixing download artifcat in the publish extension file
Browse files Browse the repository at this point in the history
  • Loading branch information
bc3tech committed Jun 13, 2024
1 parent 48bcf6c commit 1d366f6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 11 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,27 @@ jobs:
uses: actions/checkout@v4
with:
show-progress: false
sparse-checkout: |
lib/linux
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: DocGPT-unsigned.vsix
path: ./DocGPT.vsix
path: ./o

- name: Sign Extension
run: ./lib/linux/OpenVsixSignTool sign -t "http://timestamp.digicert.com" "./DocGPT.vsix" -kvu "https://${{ secrets.AZURE_KEYVAULT_NAME }}.vault.azure.net" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc "${{ secrets.SIGNING_CERTIFICATE_NAME }}"
run: |
ls
echo ---
ls lib
echo ---
ls lib/linux
echo ---
./lib/linux/OpenVsixSignTool sign -t "http://timestamp.digicert.com" "./o/DocGPT.vsix" -kvu "https://${{ secrets.AZURE_KEYVAULT_NAME }}.vault.azure.net" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc "${{ secrets.SIGNING_CERTIFICATE_NAME }}"
- name: Publish signed artifact
uses: actions/upload-artifact@v4
with:
name: DocGPT-signed.vsix
path: DocGpt.Vsix\bin\Release\DocGPT.vsix
path: ./o/DocGPT.vsix
24 changes: 16 additions & 8 deletions .github/workflows/publish-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,29 @@ jobs:

publish-to-marketplace:
needs: build-and-test
runs-on: ubuntu-latest
runs-on: windows-latest
env:
EXTENSION_VERSION: ${{ needs.build-and-test.outputs.extVersion }}

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
show-progress: false
sparse-checkout: |
DocGpt.Vsix/publishmanifest.json
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: DocGPT-signed.vsix
path: ./DocGPT.vsix
path: .\o

- name: Publish to marketplace
uses: cezarypiatek/VsixPublisherAction@1.1
with:
extension-file: ./DocGPT.vsix
publish-manifest-file: ./DocGpt.Vsix/publishmanifest.json
extension-file: .\o\DocGPT.vsix
publish-manifest-file: .\DocGpt.Vsix\publishmanifest.json
personal-access-code: ${{ secrets.MARKETPLACE_PAT }}

publish-gh-release:
Expand All @@ -37,13 +44,14 @@ jobs:
permissions: write-all
env:
EXTENSION_VERSION: ${{ needs.build-and-test.outputs.extVersion }}

GH_TOKEN: ${{ github.token }}

steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: DocGPT.vsix
path: ./DocGPT.vsix
name: DocGPT-signed.vsix
path: ./o

- name: Create Release
run: |
Expand All @@ -55,5 +63,5 @@ jobs:
- name: Upload Release Asset
run: |
gh release upload "v${{ env.EXTENSION_VERSION }}" \
--file ./DocGPT.vsix#Installer \
--file ./o/DocGPT.vsix#Installer \
--clobber

0 comments on commit 1d366f6

Please sign in to comment.