diff --git a/.github/workflows/dotnet-main.yml b/.github/workflows/dotnet-main.yml index 1da0fff6..dd3623e3 100644 --- a/.github/workflows/dotnet-main.yml +++ b/.github/workflows/dotnet-main.yml @@ -100,6 +100,14 @@ jobs: name: nuget-packages path: ./nuget + - name: Upload Package List + uses: actions/upload-artifact@v4 + with: + name: nuget-list + if-no-files-found: error + path: | + ${{ github.workspace }}/.github/workflows/SignClientFileList.txt + - name: Upload test results uses: actions/upload-artifact@v4 if: always() @@ -146,7 +154,13 @@ jobs: uses: actions/download-artifact@v4 with: name: nuget-packages - path: ./ + path: ${{ github.workspace }}/packages + + - name: Download NuGet package list + uses: actions/download-artifact@v4 + with: + name: nuget-list + path: ${{ github.workspace }} - name: Install Signing Tool run: dotnet tool install --tool-path ./tools sign --version 0.9.1-beta.23356.1 @@ -203,3 +217,4 @@ jobs: - name: Publish to GitHub packages run: dotnet nuget push ./*.nupkg --source "https://nuget.pkg.github.com/communitytoolkit/index.json" --api-key ${{ secrets.GITHUB_TOKEN }} + diff --git a/.github/workflows/dotnet-release.yml b/.github/workflows/dotnet-release.yml index 928a9c5e..198cc9f3 100644 --- a/.github/workflows/dotnet-release.yml +++ b/.github/workflows/dotnet-release.yml @@ -37,7 +37,7 @@ jobs: - uses: actions/setup-go@v5 name: Set up Go with: - go-version: '^1.22.1' + go-version: "^1.22.1" cache-dependency-path: | ./**/go.sum - uses: actions/setup-java@v4 @@ -100,6 +100,14 @@ jobs: name: nuget-packages path: ./nuget + - name: Upload Package List + uses: actions/upload-artifact@v4 + with: + name: nuget-list + if-no-files-found: error + path: | + ${{ github.workspace }}/.github/workflows/SignedPackageFileList.txt + - name: Upload test results uses: actions/upload-artifact@v4 if: always() @@ -130,25 +138,8 @@ jobs: path: "*.trx" reporter: dotnet-trx - release: - needs: build - runs-on: ubuntu-latest - environment: - name: release - steps: - - name: Download package - uses: actions/download-artifact@v4 - with: - name: nuget-packages - - - name: Release - uses: softprops/action-gh-release@v2 - with: - files: | - ./*.nupkg - sign: - needs: release + needs: build runs-on: windows-latest permissions: id-token: write # Required for requesting the JWT @@ -163,7 +154,13 @@ jobs: uses: actions/download-artifact@v4 with: name: nuget-packages - path: ./ + path: ${{ github.workspace }}/packages + + - name: Download NuGet package list + uses: actions/download-artifact@v4 + with: + name: nuget-list + path: ${{ github.workspace }} - name: Install Signing Tool run: dotnet tool install --tool-path ./tools sign --version 0.9.1-beta.23356.1 @@ -193,6 +190,23 @@ jobs: path: | ${{ github.workspace }}/packages/**/*.nupkg + release: + needs: sign + runs-on: ubuntu-latest + environment: + name: release + steps: + - name: Download package + uses: actions/download-artifact@v4 + with: + name: signed-nuget-packages + + - name: Release + uses: softprops/action-gh-release@v2 + with: + files: | + ./*.nupkg + publish-nuget: needs: sign runs-on: ubuntu-latest @@ -220,4 +234,3 @@ jobs: - name: Publish to GitHub packages run: dotnet nuget push ./*.nupkg --source "https://nuget.pkg.github.com/communitytoolkit/index.json" --api-key ${{ secrets.GITHUB_TOKEN }} -