Skip to content

.NET build & nuget push #19

.NET build & nuget push

.NET build & nuget push #19

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET build & nuget push
on:
#push:
# branches: [ "main" ]
#pull_request:
# branches: [ "main" ]
workflow_dispatch:
inputs:
run_build:
type: boolean
default: true
required: false
env:
push_source: 'StaticMemberAnalyzer.Package/bin/Release/*.nupkg'
jobs:
#checkout:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# 'workflow_call' action must have no steps!
build:
permissions:
contents: write
pull-requests: write
if: ${{ inputs.run_build }}
uses: ./.github/workflows/dotnet-build.yml
secrets: inherit
nuget:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: ${{ needs.build.outputs.artifact_name }}
path: src
- name: NuGet push
run: |
cd src
dotnet nuget push "${{ env.push_source }}" \
-k ${{ secrets.NUGET_API_KEY }} \
-s https://api.nuget.org/v3/index.json \
--timeout 60