Skip to content

Merge pull request #23 from BUTR/dependabot/nuget/NUnit-3.14.0 #23

Merge pull request #23 from BUTR/dependabot/nuget/NUnit-3.14.0

Merge pull request #23 from BUTR/dependabot/nuget/NUnit-3.14.0 #23

Workflow file for this run

name: Publish
on:
push:
branches: master
paths:
- '.github/workflows/publish.yml'
- '**.cs'
- '**.csproj'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET 7
uses: actions/setup-dotnet@master
with:
dotnet-version: 7.0.x
- name: Pack
run: |
dotnet pack src/Converter.MarkdownToBBCodeNM.Tool/Converter.MarkdownToBBCodeNM.Tool.csproj --configuration Release -o ./packages;
dotnet pack src/Converter.MarkdownToBBCodeSteam.Tool/Converter.MarkdownToBBCodeSteam.Tool.csproj --configuration Release -o ./packages;
shell: pwsh
- name: Upload packages
uses: actions/upload-artifact@v3
with:
name: packages
path: ./packages/
- name: Push to NuGet
if: github.ref == 'refs/heads/master'
run: dotnet nuget push "./packages/*.nupkg" -k ${{secrets.NUGET_API_KEY}} -s https://www.nuget.org
shell: pwsh
- name: Push to GPR
if: github.ref == 'refs/heads/master'
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