From 0345b45183b708b5b2f3452614652a3df01dfdc9 Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Tue, 3 Sep 2024 00:22:18 -0300 Subject: [PATCH] Allow per-repo publish agent OS var, and non-nuget.org prereleases Prereleases will be used to test via the CI feed exclusively. Once verified, publishing the release will push to nuget.org. This makes it easier to test before shipping to users. --- .github/workflows/publish.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a4be3ad..2bfe1b3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,7 +18,7 @@ env: jobs: publish: - runs-on: ubuntu-latest + runs-on: ${{ vars.PUBLISH_AGENT || 'ubuntu-latest' }} steps: - name: 🤘 checkout uses: actions/checkout@v4 @@ -44,8 +44,8 @@ jobs: - name: 🚀 nuget env: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} - if: env.NUGET_API_KEY != '' - run: dotnet nuget push ./bin/**/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate + if: ${{ env.NUGET_API_KEY != '' && github.event.action != 'prereleased' }} + run: dotnet nuget push ./bin/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate - name: 🚀 sleet env: @@ -53,4 +53,4 @@ jobs: if: env.SLEET_CONNECTION != '' run: | dotnet tool install -g --version 4.0.18 sleet - sleet push bin --config none -f --verbose -p "SLEET_FEED_CONTAINER=nuget" -p "SLEET_FEED_CONNECTIONSTRING=${{ secrets.SLEET_CONNECTION }}" -p "SLEET_FEED_TYPE=azure" || echo "No packages found" \ No newline at end of file + sleet push bin --config none -f --verbose -p "SLEET_FEED_CONTAINER=nuget" -p "SLEET_FEED_CONNECTIONSTRING=${{ secrets.SLEET_CONNECTION }}" -p "SLEET_FEED_TYPE=azure" || echo "No packages found"