Skip to content

Commit 4ad5d25

Browse files
committed
fix: github token
1 parent ca73b29 commit 4ad5d25

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

action.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ inputs:
2121
nuget-api-key:
2222
description: "NuGet API key"
2323
required: true
24+
github-token:
25+
description: "GitHub token"
26+
required: true
27+
nuget-source:
28+
description: "NuGet source"
29+
default: "https://api.nuget.org/v3/index.json"
30+
required: false
2431
runs:
2532
using: "composite"
2633
steps:
@@ -32,6 +39,7 @@ runs:
3239
echo "ARTIFACT_NAME=${{ inputs.artifact-name }}" >> $GITHUB_ENV
3340
echo "NUGET_API_KEY=${{ inputs.nuget-api-key }}" >> $GITHUB_ENV
3441
echo "ARTIFACT_PATH=./packages" >> $GITHUB_ENV
42+
echo "NUGET_SOURCE=${{ inputs.nuget-source }}" >> $GITHUB_ENV
3543
- name: Download package
3644
uses: actions/download-artifact@v2
3745
with:
@@ -40,8 +48,9 @@ runs:
4048
- name: Push to NuGet
4149
shell: bash
4250
run: |
43-
dotnet nuget push ${{ env.ARTIFACT_PATH }}/**/*.nupkg -k ${{ env.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
51+
dotnet nuget push ${{ env.ARTIFACT_PATH }}/**/*.nupkg -k ${{ env.NUGET_API_KEY }} -s ${{ env.NUGET_SOURCE }}
4452
- name: 🚀 Create release
4553
uses: jcdcdev/jcdcdev.GitHub.CreateRelease@main
4654
with:
4755
version: ${{ env.VERSION }}
56+
github-token: ${{ inputs.github-token }}

0 commit comments

Comments
 (0)