mirror of
https://github.com/NuclearPowered/Reactor.git
synced 2026-10-19 15:51:54 +00:00
The cache action requires the checksum of the packages.lock.json files, but can't find them because the repository wasn't cloned yet. So clone the repository first
53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
name: CI
|
|
|
|
on: ["push", "pull_request"]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~/.nuget/packages
|
|
~/.cache/bepinex
|
|
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-nuget-
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v1
|
|
with:
|
|
dotnet-version: 6.x
|
|
|
|
- name: Run the Cake script
|
|
uses: cake-build/cake-action@v1
|
|
with:
|
|
verbosity: Diagnostic
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Reactor.dll
|
|
path: Reactor/bin/Release/netstandard2.1/Reactor.dll
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Reactor.nupkg
|
|
path: Reactor/bin/Release/Reactor.*.nupkg
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Reactor.Debugger.dll
|
|
path: Reactor.Debugger/bin/Release/netstandard2.1/Reactor.Debugger.dll
|
|
|
|
- uses: softprops/action-gh-release@v1
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
draft: true
|
|
files: Reactor/bin/Release/netstandard2.1/Reactor.dll
|