Skip to content

move shit around

move shit around #6

name: Publish NuGet (on [publish] commit)
on:
push:
branches:
- "**"
jobs:
publish:
if: contains(github.event.head_commit.message, '[publish]')
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: "10.0.x"
- name: Restore
run: |
dotnet restore ./SwDevtools.slnx || dotnet restore ./SwDevtools.csproj
- name: Build (Release)
run: |
dotnet build ./SwDevtools.slnx -c Release --no-restore || \
dotnet build ./SwDevtools.csproj -c Release --no-restore
- name: Verify package exists
run: |
ls -la artifacts
test -f artifacts/*.nupkg
- name: Push package to NuGet.org
run: |
dotnet nuget push "artifacts/*.nupkg" \
--source https://api.nuget.org/v3/index.json \
--api-key ${{ secrets.NUGET_API_KEY }} \
--skip-duplicate