Skip to content

Merge branch 'master' of https://github.com/BUTR/FetchBannerlordVersion #41

Merge branch 'master' of https://github.com/BUTR/FetchBannerlordVersion

Merge branch 'master' of https://github.com/BUTR/FetchBannerlordVersion #41

Workflow file for this run

name: Publish Tool and NuGet
on:
push:
branches:
- master
env:
# Disable the .NET logo in the console output.
DOTNET_NOLOGO: true
# Disable the .NET first time experience to skip caching NuGet packages and speed up the build.
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
# Disable sending .NET CLI telemetry to Microsoft.
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
build:
name: Publish to NuGet and GPR
runs-on: ubuntu-latest
steps:
- name: Setup
uses: butr/[email protected]
with:
github-token: ${{secrets.GITHUB_TOKEN}}
- name: Setup .NET 8
uses: actions/setup-dotnet@master
with:
dotnet-version: 8.x.x
include-prerelease: true
- run: dotnet pack -c Release src/FetchBannerlordVersion -o ./packages
- run: dotnet pack -c Release src/FetchBannerlordVersion.Source -o ./packages
- run: dotnet pack -c Release src/FetchBannerlordVersion.DependencyInjection -o ./packages
- name: Push to NuGet
run: dotnet nuget push "./packages/*.nupkg" -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json
- 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