Typo fix for the Sdk template #94
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: Build and Publish | |
on: | |
push: | |
branches: master | |
paths: | |
- '.github/workflows/publish.yml' | |
- 'src/**' | |
- 'resources/**' | |
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 | |
# Set the build number in MinVer. | |
BUILD_NUMBER: ${{github.run_number}} | |
jobs: | |
build-and-publish: | |
name: Build and Publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup | |
uses: butr/actions-common-setup@v2 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
fetch-depth: 0 | |
- name: Pack | |
run: dotnet pack src/Bannerlord.Templates.csproj -c Release -o ./packages | |
shell: pwsh | |
- name: Push to NuGet | |
run: dotnet nuget push "./packages/*.nupkg" -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json | |
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 |