-
Notifications
You must be signed in to change notification settings - Fork 56
37 lines (29 loc) · 1.02 KB
/
nuget.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
name: Push to nuget feed on release
on:
release:
types: [published]
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup Nuget
uses: nuget/setup-nuget@v1
- name: Nuget pack
working-directory: .
env:
NUGET_ENABLE_LEGACY_CSPROJ_PACK: true
run: |
nuget restore
gci -Recurse -Filter *.nuspec | foreach { nuget pack "$($_.DirectoryName)\$($_.BaseName).csproj" -build -properties Configuration=Release }
- name: Nuget push
working-directory: .
env:
NUGET_URL: https://pkgs.dev.azure.com/IllusionMods/Nuget/_packaging/IllusionMods/nuget/v3/index.json
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
NUGET_ENABLE_LEGACY_CSPROJ_PACK: true
run: |
nuget sources update -name "IllusionMods" -username "token" -password ${env:NUGET_TOKEN}
nuget push *.nupkg -apikey key -noninteractive -skipduplicate -src ${env:NUGET_URL}