Fix #5
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 | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Setup .NET 9 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 9.x.x | |
- name: Pack | |
run: >- | |
dotnet build PrismSharp.RegExCompiler/PrismSharp.RegExCompiler.csproj --configuration Release; | |
dotnet build PrismSharp.SourceGenerator/PrismSharp.SourceGenerator.csproj --configuration Release; | |
dotnet build PrismSharp.Core/PrismSharp.Core.csproj --configuration Release; | |
dotnet pack PrismSharp.Core/PrismSharp.Core.csproj --configuration Release -o "./packages"; | |
shell: pwsh | |
- name: Push to NuGet | |
run: dotnet nuget push "./packages/*.nupkg" -k ${{secrets.NUGET_API_KEY}} -s https://www.nuget.org | |
shell: pwsh | |
- name: Push to GPR | |
run: | | |
for f in ./packages/*.nupkg | |
do | |
curl -vX PUT -u "vslee:${{secrets.GITHUB_TOKEN}}" -F package=@$f https://nuget.pkg.github.com/BUTR/ | |
done | |
shell: bash | |