-
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.17 KB
/
dotnet-nuget-push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# 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