-
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #161 from hubastard/initial-ci-workflow
Add workflow yml for GitHub Actions/CI
- Loading branch information
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Build - Win x64 | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request_review: | ||
types: [ submitted ] | ||
|
||
jobs: | ||
|
||
build: | ||
strategy: | ||
matrix: | ||
configuration: [Debug, Release] | ||
|
||
# We *only* want to run this if a collaborator or owner of the repo approves a pull request, or if something is merged into the main branch | ||
if: ${{ github.event.ref == 'refs/heads/master' || (github.event.review.state == 'approved' && (github.event.review.author_association == 'COLLABORATOR' || github.event.review.author_association == 'OWNER')) }} | ||
runs-on: dsp-installed | ||
|
||
env: | ||
Solution_Name: Nebula.sln | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Clear output directory in DSP files | ||
# We use SilentlyContinue here because it errors out of the folder does not exist otherwise | ||
run: rm -R -ErrorAction SilentlyContinue "C:\Program Files (x86)\Steam\steamapps\common\Dyson Sphere Program\BepInEx\plugins\Nebula" | ||
|
||
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild | ||
- name: Setup MSBuild.exe | ||
uses: microsoft/[email protected] | ||
|
||
# Build it | ||
- name: Build the application | ||
run: msbuild $env:Solution_Name /restore /p:Configuration=$env:Configuration | ||
env: | ||
Configuration: ${{ matrix.configuration }} | ||
|
||
# Upload it to the run results | ||
- name: Upload a Build Artifact | ||
uses: actions/[email protected] | ||
with: | ||
# Artifact name | ||
name: build-artifacts | ||
# A file, directory or wildcard pattern that describes what to upload | ||
path: C:\Program Files (x86)\Steam\steamapps\common\Dyson Sphere Program\BepInEx\plugins\Nebula |