forked from Exiled-Official/EXILED
-
Notifications
You must be signed in to change notification settings - Fork 52
52 lines (38 loc) · 1.48 KB
/
push_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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Exiled CD
on:
release:
types: [published]
workflow_dispatch:
defaults:
run:
working-directory: ./EXILED
env:
EXILED_REFERENCES_URL: https://ExMod-Team.github.io/SL-References/Dev.zip
EXILED_REFERENCES_PATH: ${{ github.workspace }}/EXILED/References
jobs:
push:
runs-on: windows-latest
steps:
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4.0.1
- name: Setup Nuget
uses: NuGet/setup-nuget@v2
- uses: actions/checkout@v4.1.7
- name: Get references
shell: pwsh
run: |
Invoke-WebRequest -Uri ${{ env.EXILED_REFERENCES_URL }} -OutFile ${{ github.workspace }}/EXILED/References.zip
Expand-Archive -Path References.zip -DestinationPath ${{ env.EXILED_REFERENCES_PATH }}
- name: Build NuGet
env:
EXILED_REFERENCES: ${{ env.EXILED_REFERENCES_PATH }}
shell: pwsh
run: |
./build.ps1 -BuildNuGet
$File = (Get-ChildItem -Path . -Include 'ExMod.Exiled.*.nupkg' -Recurse).Name
Out-File -FilePath ${{ github.env }} -InputObject "PackageFile=$File" -Encoding utf-8 -Append
- name: Push NuGet
shell: pwsh
run: nuget push ${{ env.PackageFile }} -ApiKey ${{ secrets.NUGET_API_KEY }} -Source https://api.nuget.org/v3/index.json -SkipDuplicate
- name: Push generated package to GitHub registry
run: dotnet nuget push ${{ env.PackageFile }} -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/ExMod-Team/index.json --skip-duplicate