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
14 changes: 11 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ on:
description: "Dry Run Mode"
required: true
type: boolean

jobs:
deploy:
runs-on: ubuntu-latest
environment: publish
permissions:
id-token: write
steps:
- uses: actions/checkout@v4

Expand All @@ -40,10 +42,16 @@ jobs:
- name: Extract Artifacts
run: 7z x nugets.zip -o./nugets

- name: NuGet login (OIDC)
id: nuget-login
uses: NuGet/login@v1
with:
user: ${{ secrets.NUGET_BOT_USERNAME }}

- name: Publish NuGet
if: ${{ inputs.publish_nuget }}
run: |
COMMAND="dotnet nuget push ./nugets/Devolutions.XTS.NET.*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json"
COMMAND="dotnet nuget push ./nugets/Devolutions.XTS.NET.*.nupkg --api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json"

if [ '${{ inputs.publish_dry_run }}' == 'true' ]; then
echo "Dry Run : True"
Expand All @@ -53,6 +61,6 @@ jobs:

echo "Running : $COMMAND"

if [ "${{ inputs.publish_dry_run }}" != "true" ]; then # if not dry run, actually run the command
if [ "${{ inputs.publish_dry_run }}" != "true" ]; then
eval "$COMMAND"
fi