44 push :
55 branches :
66 - main
7+ - ci
78 - release/*
8- tags :
9- - " v*"
10- pull_request :
11- branches :
12- - main
13- - release/*
14- types : [ labeled, opened, synchronize, reopened ]
159
1610jobs :
1711 # Prime a single LFS cache and expose the exact key for the matrix
@@ -216,7 +210,10 @@ jobs:
216210 path : tests/Images/ActualOutput/
217211
218212 Publish :
219- needs : [Build]
213+ permissions :
214+ id-token : write # Required for OIDC
215+ contents : read
216+ needs : [ Build ]
220217 runs-on : ubuntu-latest
221218 if : (github.event_name == 'push')
222219 steps :
@@ -243,19 +240,31 @@ jobs:
243240 key : ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets') }}
244241 restore-keys : ${{ runner.os }}-nuget-
245242
246- - name : DotNet Pack
243+ - name : Compute Version
244+ id : compute-version
247245 shell : pwsh
248- run : ./ci-pack.ps1
246+ run : |
247+ $date = Get-Date -Format "yyyy.MM.dd"
248+ $buildNumber = "${{ github.run_number }}"
249+ $version = "$date-mc.$buildNumber"
250+ echo "version=$version" >> $env:GITHUB_OUTPUT
251+ echo "Computed version: $version"
249252
250- - name : Feedz Publish
253+ - name : DotNet Pack
251254 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
255+ run : ./ci-pack.ps1 -version "${{ steps.compute-version.outputs.version }}"
256+
257+ - name : Azure Login
258+ uses : azure/login@v2
259+ with :
260+ client-id : ${{ secrets.AZURE_CLIENT_ID }}
261+ tenant-id : ${{ secrets.AZURE_TENANT_ID }}
262+ subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
263+
264+ - name : Install Sleet
265+ run : dotnet tool install -g sleet
255266
256- - name : NuGet Publish
257- if : ${{ startsWith(github.ref, 'refs/tags/') }}
267+ - name : Publish Internal
258268 shell : pwsh
259269 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
270+ sleet push ./artifacts --config sleet.json artifacts
0 commit comments