Skip to content

removed testing for package deployment testing. #2

removed testing for package deployment testing.

removed testing for package deployment testing. #2

Workflow file for this run

name: .NET CI/CD Pipeline
on:
push:
branches:
- main
pull_request:
branches:
- main
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0'
- name: Build
run: dotnet build --configuration Release
# test:
# runs-on: ubuntu-latest
# needs: build
# if: github.ref == 'refs/heads/main'
# steps:
# - name: Checkout Code
# uses: actions/checkout@v3
# - name: Setup .NET
# uses: actions/setup-dotnet@v2
# with:
# dotnet-version: '6.0'
# - name: Test
# run: dotnet test
deploy:
runs-on: ubuntu-latest
needs: test

Check failure on line 46 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / .NET CI/CD Pipeline

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 46, Col: 12): Job 'deploy' depends on unknown job 'test'.
if: github.event_name == 'release' && github.event.action == 'created'
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0'
source-url: https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY }}
- name: Pack
run: dotnet pack --configuration Release --output nupkgs
- name: Publish
run: dotnet nuget push "nupkgs/**/*.nupkg" --source https://api.nuget.org/v3/index.json
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}