From d3f14e0ec154ba02e34617eb32e7c49fb13f4a3a Mon Sep 17 00:00:00 2001 From: christian <6939810+chkr1011@users.noreply.github.com> Date: Fri, 17 May 2024 17:00:15 +0200 Subject: [PATCH] Improve CI --- .github/workflows/ci.yml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e0902516..c3cec2ce6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,6 @@ jobs: **/*.snupkg test: - needs: build runs-on: ubuntu latest steps: @@ -61,7 +60,7 @@ jobs: dotnet-version: | 6.0.x - - name: Download build artifacts + - name: Download nuget packages uses: actions/download-artifact@v4 with: name: nugets @@ -85,6 +84,25 @@ jobs: --azure-key-vault-certificate "${{ secrets.KEY_VAULT_CERTIFICATE_ID }}" ` --azure-key-vault-url "${{ secrets.KEY_VAULT_URL }}" + - name: Upload signed nuget packages + uses: actions/upload-artifact@v4 + with: + name: signed-nugets + path: | + **/*.nupkg + **/*.snupkg + + publish: + if: ${{ github.event_name == 'push' }} + needs: sign + runs-on: ubuntu-latest + + steps: + - name: Download signed nuget packages + uses: actions/download-artifact@v4 + with: + name: signed-nugets + path: nugets + - name: Publish MyGet nugets - if: ${{ github.event_name == 'push' }} run: dotnet nuget push ${{ github.workspace }}\nugets\**/*.nupkg -k ${{ secrets.MYGET_API_KEY }} -s https://www.myget.org/F/mqttnet/api/v3/index.json --skip-duplicate