Skip to content

Update docs.yml

Update docs.yml #138

Workflow file for this run

name: Exiled Main CI
on:
push:
branches:
- master
pull_request:
branches:
- master
defaults:
run:
working-directory: ./EXILED
env:
EXILED_REFERENCES_URL: https://exmod-team.github.io/SL-References/Master.zip
EXILED_REFERENCES_PATH: ${{ github.workspace }}/EXILED/References
jobs:
build:
runs-on: windows-latest
# Prevent double running for push & pull_request events from the main repo
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
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
env:
EXILED_REFERENCES: ${{ env.EXILED_REFERENCES_PATH }}
shell: pwsh
run: |
./build.ps1 -BuildNuGet
$File = (Get-ChildItem -Path . -Include 'EXILED-OFFICIAL.*.nupkg' -Recurse).Name
Out-File -FilePath ${{ github.env }} -InputObject "PackageFile=$File" -Encoding utf-8 -Append
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Build Results
path: EXILED/bin/Release
- name: Upload nuget package
uses: actions/upload-artifact@v4
with:
name: ${{ env.PackageFile }}
path: EXILED/${{ env.PackageFile }}