Skip to content

2.0.0-beta5

2.0.0-beta5 #27

Workflow file for this run

name: Push Nuget
on:
release:
types: [published]
jobs:
build:
runs-on: windows-latest
env:
REFERENCES_URL: https://exmod-team.github.io/SL-References/Dev.zip
REFERENCES_PATH: ${{ github.workspace }}/References
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Dotnet
uses: actions/[email protected]
- name: Download References
shell: pwsh
run: |
Invoke-WebRequest -Uri ${{ env.REFERENCES_URL }} -OutFile "${{ github.workspace }}/References.zip"
Expand-Archive -Path "${{ github.workspace }}/References.zip" -DestinationPath ${{ env.REFERENCES_PATH }}
- name: Rename Assembly-CSharp-Publicized to Assembly-CSharp
shell: pwsh
run: |
Rename-Item -Path "${{ env.REFERENCES_PATH }}\Assembly-CSharp-Publicized.dll" -NewName "Assembly-CSharp.dll"
- name: Build
env:
SL_REFERENCES: ${{ env.REFERENCES_PATH }}
shell: pwsh
run: |
dotnet build -c Release
- name: Pack NuGet package
run: dotnet pack -c Release --output ${GITHUB_WORKSPACE}/nupkgs
- name: Push NuGet package
run: |
$PackageFile = (Get-ChildItem -Path "${GITHUB_WORKSPACE}/nupkgs" -Include 'SecretAPI.*.nupkg' -Recurse | Select-Object -First 1).FullName
dotnet nuget push $PackageFile --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json