From 8f9757215bb508530d3d3c68aa96b21d3658bb35 Mon Sep 17 00:00:00 2001 From: Teodor Voinea Date: Fri, 19 Nov 2021 14:12:11 -0800 Subject: [PATCH 1/3] Skip uploading bits to the release --- .github/workflows/build-release.yml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index a1cf2c91e..f218c36e2 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -4,11 +4,9 @@ on: push: branches: - main - pull_request: release: types: - published - workflow_dispatch: jobs: build: @@ -43,18 +41,6 @@ jobs: - name: Tar the output run: tar -C ./dist -cvf ./dist-release/component-detection.tar.gz . - - name: Upload Extension Release Asset - id: upload-component-detection-release-asset - if: github.event_name == 'release' - uses: actions/upload-release-asset@v1.0.2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release_draft.outputs.upload_url }} - asset_path: ./dist-release/component-detection.tar.gz - asset_name: component-detection.tar.gz - asset_content_type: application/zip - - name: Add NuGet publication source for Github packages if: github.event_name == 'release' run: dotnet nuget add source https://nuget.pkg.github.com/microsoft/index.json --password $GITHUB_TOKEN --username notused --store-password-in-clear-text --name cgwriter From 6977a04f0b4f784606afa27a7e03cdddbbae168c Mon Sep 17 00:00:00 2001 From: Teo Voinea <58236992+tevoinea@users.noreply.github.com> Date: Fri, 19 Nov 2021 17:22:00 -0500 Subject: [PATCH 2/3] Update build-release.yml --- .github/workflows/build-release.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index f218c36e2..c82bd5049 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -40,6 +40,24 @@ jobs: - name: Tar the output run: tar -C ./dist -cvf ./dist-release/component-detection.tar.gz . + + - name: Get release + id: get_release + uses: bruceadams/get-release@v1.2.3 + env: + GITHUB_TOKEN: ${{ github.token }} + + - name: Upload Extension Release Asset + id: upload-component-detection-release-asset + if: github.event_name == 'release' + uses: actions/upload-release-asset@v1.0.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.get_release.outputs.upload_url }} + asset_path: ./dist-release/component-detection.tar.gz + asset_name: component-detection.tar.gz + asset_content_type: application/zip - name: Add NuGet publication source for Github packages if: github.event_name == 'release' From 3af82b3f26e0255fbaf567afa92f2c72fb315019 Mon Sep 17 00:00:00 2001 From: Teo Voinea <58236992+tevoinea@users.noreply.github.com> Date: Fri, 19 Nov 2021 17:22:38 -0500 Subject: [PATCH 3/3] Update build-release.yml --- .github/workflows/build-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index c82bd5049..1659d360f 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -42,6 +42,7 @@ jobs: run: tar -C ./dist -cvf ./dist-release/component-detection.tar.gz . - name: Get release + if: github.event_name == 'release' id: get_release uses: bruceadams/get-release@v1.2.3 env: