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
12 changes: 10 additions & 2 deletions .github/workflows/release-nugets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
deploy:
environment: publish
runs-on: ubuntu-22.04
permissions:
id-token: write

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -57,10 +59,16 @@ jobs:
version=$(grep "version" config.txt | sed -E 's/version = "(.*)"/\1/')
echo "version=$version" >> $GITHUB_OUTPUT

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

- name: Publish Core NuGet
if: ${{ inputs.publish_core_nuget }}
run: |
COMMAND="dotnet nuget push ./devolutions-crypto-nugets/Devolutions.Crypto.Core.*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json"
COMMAND="dotnet nuget push ./devolutions-crypto-nugets/Devolutions.Crypto.Core.*.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 @@ -70,7 +78,7 @@ 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"

git tag "nuget-v${{ steps.version.outputs.version }}"
Expand Down
Loading