Skip to content

Publish Packages

Publish Packages #2

Workflow file for this run

name: Publish Packages
on:
push:
tags:
- 'v*.*.*' # Match version tags like v1.0.0
jobs:
publish:

Check failure on line 9 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / Publish Packages

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 9, Col: 3): The workflow must contain at least one job with no dependencies.
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '9.x'
- name: Restore dependencies
run: dotnet restore CodeOfChaos.CliArgsParser.sln
- name: Build
run: dotnet build CodeOfChaos.CliArgsParser.sln --configuration Release --no-restore
- name: Run tests
run: dotnet test --no-build --verbosity normal
- name: Publish to NuGet
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: |
dotnet nuget push src/CodeOfChaos.CliArgsParser.Contracts/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json --skip-duplicate
dotnet nuget push src/CodeOfChaos.CliArgsParser/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json --skip-duplicate
dotnet nuget push src/CodeOfChaos.CliArgsParser.Library/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json --skip-duplicate