Skip to content

Commit

Permalink
Allow per-repo publish agent OS var, and non-nuget.org prereleases
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kzu authored Sep 3, 2024
1 parent 33000c0 commit 0345b45
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -44,13 +44,13 @@ 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:
SLEET_CONNECTION: ${{ secrets.SLEET_CONNECTION }}
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"
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"

0 comments on commit 0345b45

Please sign in to comment.