From 2824a3095eec6cda21b294a67f8cdf8dcc0e9702 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] debug! --- .github/workflows/build-and-test.yml | 136 +++++++++++++----------- .github/workflows/publish-extension.yml | 92 ++++++++-------- 2 files changed, 120 insertions(+), 108 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 3795f27..b25a013 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -11,61 +11,61 @@ env: EXTENSION_VERSION: 1.0.${{ github.run_number }} jobs: - run-tests: - runs-on: ubuntu-latest - - steps: - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: "8.x" - - - name: Checkout code - uses: actions/checkout@v4 - with: - show-progress: false - - - name: Run unit tests - run: dotnet test ./DocGpt.Test/DocGpt.Test.csproj --configuration Release - - package-extension: - # VS extension packaging requires netfx, so have to run it on Windows - runs-on: windows-latest - - steps: - - name: Setup MSBuild for NetFX - uses: microsoft/setup-msbuild@v2 - with: - vs-version: 17.0 - - - name: Checkout code - uses: actions/checkout@v4 - with: - show-progress: false - - - name: Bump version - run: | - # Use PowerShell to update the version in the VSIX manifest - $xml = [xml](Get-Content -Path .\DocGpt.Vsix\source.extension.vsixmanifest) - $identityNode = $xml.PackageManifest.Metadata.Identity - $identityNode.SetAttribute('Version', $env:EXTENSION_VERSION) - $xml.Save(".\DocGpt.Vsix\source.extension.vsixmanifest") - - echo "extVersion::$env:EXTENSION_VERSION" >> "$GITHUB_OUTPUT" - - - name: Restore NuGet packages - run: nuget restore .\DocGpt.sln - - - name: Build Extension - run: msbuild .\DocGpt.sln -p:Configuration=Release - - - name: Store unsigned artifact - uses: actions/upload-artifact@v4 - with: - name: DocGPT-unsigned.vsix - path: DocGpt.Vsix\bin\Release\DocGPT.vsix + # run-tests: + # runs-on: ubuntu-latest + + # steps: + # - name: Setup .NET + # uses: actions/setup-dotnet@v4 + # with: + # dotnet-version: "8.x" + + # - name: Checkout code + # uses: actions/checkout@v4 + # with: + # show-progress: false + + # - name: Run unit tests + # run: dotnet test ./DocGpt.Test/DocGpt.Test.csproj --configuration Release + + # package-extension: + # # VS extension packaging requires netfx, so have to run it on Windows + # runs-on: windows-latest + + # steps: + # - name: Setup MSBuild for NetFX + # uses: microsoft/setup-msbuild@v2 + # with: + # vs-version: 17.0 + + # - name: Checkout code + # uses: actions/checkout@v4 + # with: + # show-progress: false + + # - name: Bump version + # run: | + # # Use PowerShell to update the version in the VSIX manifest + # $xml = [xml](Get-Content -Path .\DocGpt.Vsix\source.extension.vsixmanifest) + # $identityNode = $xml.PackageManifest.Metadata.Identity + # $identityNode.SetAttribute('Version', $env:EXTENSION_VERSION) + # $xml.Save(".\DocGpt.Vsix\source.extension.vsixmanifest") + + # echo "extVersion::$env:EXTENSION_VERSION" >> "$GITHUB_OUTPUT" + + # - name: Restore NuGet packages + # run: nuget restore .\DocGpt.sln + + # - name: Build Extension + # run: msbuild .\DocGpt.sln -p:Configuration=Release + + # - name: Store unsigned artifact + # uses: actions/upload-artifact@v4 + # with: + # name: DocGPT-unsigned.vsix + # path: DocGpt.Vsix\bin\Release\DocGPT.vsix sign-extension: - needs: package-extension + # needs: package-extension runs-on: ubuntu-latest steps: @@ -73,18 +73,30 @@ 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 + repository: ${{ github.repository }} + run-id: 9492354653 + 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 }}" - - - 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 + run: | + ls + echo --- + ls lib + echo --- + ls lib/linux + echo --- + ./lib/linux/OpenVsixSignTool sign -h + # run: ./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 diff --git a/.github/workflows/publish-extension.yml b/.github/workflows/publish-extension.yml index 0cb0a47..a0d1860 100644 --- a/.github/workflows/publish-extension.yml +++ b/.github/workflows/publish-extension.yml @@ -11,49 +11,49 @@ jobs: uses: ./.github/workflows/build-and-test.yml secrets: inherit - publish-to-marketplace: - needs: build-and-test - runs-on: ubuntu-latest - env: - EXTENSION_VERSION: ${{ needs.build-and-test.outputs.extVersion }} - - steps: - - name: Download artifact - uses: actions/download-artifact@v4 - with: - name: DocGPT-signed.vsix - path: ./DocGPT.vsix - - - name: Publish to marketplace - uses: cezarypiatek/VsixPublisherAction@1.1 - with: - extension-file: ./DocGPT.vsix - publish-manifest-file: ./DocGpt.Vsix/publishmanifest.json - personal-access-code: ${{ secrets.MARKETPLACE_PAT }} - - publish-gh-release: - needs: build-and-test - runs-on: ubuntu-latest - permissions: write-all - env: - EXTENSION_VERSION: ${{ needs.build-and-test.outputs.extVersion }} - - steps: - - name: Download artifact - uses: actions/download-artifact@v4 - with: - name: DocGPT.vsix - path: ./DocGPT.vsix - - - name: Create Release - run: | - gh release create --target "${{ github.sha }}" \ - --title "v${{ env.EXTENSION_VERSION }}" \ - --generate-notes - --draft - - - name: Upload Release Asset - run: | - gh release upload "v${{ env.EXTENSION_VERSION }}" \ - --file ./DocGPT.vsix#Installer \ - --clobber +# publish-to-marketplace: +# needs: build-and-test +# runs-on: ubuntu-latest +# env: +# EXTENSION_VERSION: ${{ needs.build-and-test.outputs.extVersion }} + +# steps: +# - name: Download artifact +# uses: actions/download-artifact@v4 +# with: +# name: DocGPT-signed.vsix +# path: ./DocGPT.vsix + +# - name: Publish to marketplace +# uses: cezarypiatek/VsixPublisherAction@1.1 +# with: +# extension-file: ./DocGPT.vsix +# publish-manifest-file: ./DocGpt.Vsix/publishmanifest.json +# personal-access-code: ${{ secrets.MARKETPLACE_PAT }} + +# publish-gh-release: +# needs: build-and-test +# runs-on: ubuntu-latest +# permissions: write-all +# env: +# EXTENSION_VERSION: ${{ needs.build-and-test.outputs.extVersion }} + +# steps: +# - name: Download artifact +# uses: actions/download-artifact@v4 +# with: +# name: DocGPT.vsix +# path: ./DocGPT.vsix + +# - name: Create Release +# run: | +# gh release create --target "${{ github.sha }}" \ +# --title "v${{ env.EXTENSION_VERSION }}" \ +# --generate-notes +# --draft + +# - name: Upload Release Asset +# run: | +# gh release upload "v${{ env.EXTENSION_VERSION }}" \ +# --file ./DocGPT.vsix#Installer \ +# --clobber