Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,13 @@ jobs:
permissions:
actions: read
contents: write
id-token: write # Required for Azure CLI Login
id-token: write # Required for Azure / NuGet CLI Login
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: ⚙️ Initialization
shell: pwsh
run: |
if ('${{ secrets.NUGET_API_KEY }}') {
Write-Host "NUGET_API_KEY secret detected. NuGet packages will be pushed."
echo "NUGET_API_KEY_DEFINED=true" >> $env:GITHUB_ENV
}

if ('${{ secrets.NPM_API_KEY }}') {
Write-Host "NPM_API_KEY secret detected. NPM packages will be pushed."
echo "NPM_API_KEY_DEFINED=true" >> $env:GITHUB_ENV
Expand Down Expand Up @@ -115,9 +110,14 @@ jobs:
gh release -R ${{ github.repository }} upload "${{ github.ref_name }}" $_.FullName
}

- name: 🪪 Authorize NuGet package push
uses: NuGet/login@v1
id: nuget-login
with:
user: ${{ secrets.NUGET_USER }}

- name: 🚀 Push NuGet packages
run: dotnet nuget push ${{ runner.temp }}\deployables\*.nupkg --source https://api.nuget.org/v3/index.json -k '${{ secrets.NUGET_API_KEY }}'
if: ${{ env.NUGET_API_KEY_DEFINED == 'true' }}
run: dotnet nuget push ${{ runner.temp }}\deployables\*.nupkg --source https://api.nuget.org/v3/index.json -k '${{ steps.nuget-login.outputs.NUGET_API_KEY }}'

- name: 🚀 Push NPM packages
shell: pwsh
Expand Down
Loading