Publish to GitHub Packages #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to GitHub Packages | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Restore NuGet packages | |
run: dotnet restore | |
- name: Build project | |
run: dotnet build --configuration Release | |
- name: Pack project | |
run: dotnet pack --configuration Release | |
- name: Publish NuGet package to GitHub Packages | |
run: dotnet nuget push GDS.Components/bin/Release/*.nupkg --source "https://nuget.pkg.github.com/pa-digital/index.json" --api-key ${{ secrets.GITHUB_TOKEN }} |