Skip to content

Commit

Permalink
ci: Deploy staging to GitHub packages (#1291)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveSkender authored Dec 16, 2024
1 parent 0df1f2b commit ec07a86
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/deploy-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ jobs:

permissions:
contents: write
packages: write

environment:
name: ${{ inputs.environment }}
Expand All @@ -134,7 +135,7 @@ jobs:
dotnet-quality: "ga"

- name: Setup NuGet
uses: nuget/setup-nuget@v1
uses: nuget/setup-nuget@v2
with:
nuget-api-key: ${{ secrets.NUGET_TOKEN }}
nuget-version: '6.x'
Expand All @@ -145,12 +146,10 @@ jobs:
name: packages
path: NuGet

- name: Publish to Azure Artifacts (staging)
- name: Publish to GitHub Packages (staging)
if: inputs.environment == 'staging'
run: |
dotnet new nugetconfig --force
nuget sources Add -Name "AzureArtifacts" -Source ${{ vars.NUGET_PUBLISH_URL }} -UserName DaveSkender -Password ${{ secrets.NUGET_TOKEN }} -NonInteractive -ConfigFile nuget.config
nuget push NuGet/*.nupkg -src AzureArtifacts -ApiKey AZ -NonInteractive -ConfigFile nuget.config
dotnet nuget push NuGet/*.nupkg --source "https://nuget.pkg.github.com/DaveSkender/index.json" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
- name: Publish to NuGet.org
if: inputs.environment == 'nuget.org'
Expand Down

0 comments on commit ec07a86

Please sign in to comment.