From 1d366f61c996d645ce291febf404db2c4dd530a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brandon=F0=9F=8C=A9=EF=B8=8FH?= Date: Wed, 12 Jun 2024 19:00:18 -0700 Subject: [PATCH] Fixing download artifcat in the publish extension file --- .github/workflows/build-and-test.yml | 15 ++++++++++++--- .github/workflows/publish-extension.yml | 24 ++++++++++++++++-------- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 3795f27..940ea54 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -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 \ No newline at end of file + path: ./o/DocGPT.vsix \ No newline at end of file diff --git a/.github/workflows/publish-extension.yml b/.github/workflows/publish-extension.yml index 0cb0a47..93627c1 100644 --- a/.github/workflows/publish-extension.yml +++ b/.github/workflows/publish-extension.yml @@ -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: @@ -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: | @@ -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