55 branches :
66 - main
77 - release/*
8- tags :
9- - " v*"
10- pull_request :
11- branches :
12- - main
13- - release/*
14- types : [ opened, synchronize, reopened ]
158
169jobs :
1710 # Prime a single LFS cache and expose the exact key for the matrix
@@ -216,7 +209,10 @@ jobs:
216209 path : tests/Images/ActualOutput/
217210
218211 Publish :
219- needs : [Build]
212+ permissions :
213+ id-token : write # Required for OIDC
214+ contents : read
215+ needs : [ Build ]
220216 runs-on : ubuntu-latest
221217 if : (github.event_name == 'push')
222218 steps :
@@ -235,6 +231,16 @@ jobs:
235231 - name : NuGet Install
236232 uses : NuGet/setup-nuget@v2
237233
234+ - name : Compute Version
235+ id : compute-version
236+ shell : pwsh
237+ run : |
238+ $date = Get-Date -Format "yyyy.M.d"
239+ $buildNumber = "${{ github.run_number }}"
240+ $version = "$date-mc.$buildNumber"
241+ echo "version=$version" >> $env:GITHUB_OUTPUT
242+ echo "Computed version: $version"
243+
238244 - name : NuGet Setup Cache
239245 uses : actions/cache@v5
240246 id : nuget-cache
@@ -245,17 +251,19 @@ jobs:
245251
246252 - name : DotNet Pack
247253 shell : pwsh
248- run : ./ci-pack.ps1
254+ run : ./ci-pack.ps1 -version "${{ steps.compute-version.outputs.version }}"
249255
250- - name : Feedz Publish
251- shell : pwsh
252- run : |
253- dotnet nuget push .\artifacts\*.nupkg -k ${{secrets.FEEDZ_TOKEN}} -s https://f.feedz.io/sixlabors/sixlabors/nuget/index.json --skip-duplicate
254- dotnet nuget push .\artifacts\*.snupkg -k ${{secrets.FEEDZ_TOKEN}} -s https://f.feedz.io/sixlabors/sixlabors/symbols --skip-duplicate
256+ - name : Azure Login
257+ uses : azure/login@v2
258+ with :
259+ client-id : ${{ secrets.AZURE_CLIENT_ID }}
260+ tenant-id : ${{ secrets.AZURE_TENANT_ID }}
261+ subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
262+
263+ - name : Install Sleet
264+ run : dotnet tool install -g sleet
255265
256- - name : NuGet Publish
257- if : ${{ startsWith(github.ref, 'refs/tags/') }}
266+ - name : Publish Internal
258267 shell : pwsh
259268 run : |
260- dotnet nuget push .\artifacts\*.nupkg -k ${{secrets.NUGET_TOKEN}} -s https://api.nuget.org/v3/index.json --skip-duplicate
261- dotnet nuget push .\artifacts\*.snupkg -k ${{secrets.NUGET_TOKEN}} -s https://api.nuget.org/v3/index.json --skip-duplicate
269+ sleet push ./artifacts --config sleet.json artifacts
0 commit comments