Add build CI

This commit is contained in:
Barichello 2022-01-12 18:47:04 -03:00
parent 2a57c1ef27
commit 0cd78a9d36
No known key found for this signature in database
GPG Key ID: 29197D315AE4FF67
1 changed files with 69 additions and 0 deletions

69
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,69 @@
name: Build
on:
release:
types:
- created
env:
NORTHSTAR_VERSION: ${{ secrets.NORTHSTAR_VERSION }}
jobs:
build-launcher:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v2
with:
repository: R2Northstar/NorthstarLauncher
ref: ${{ env.NORTHSTAR_VERSION }}
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.1
- name: Build
run: msbuild /p:Configuration=Release
- name: Upload Build Artifact
uses: actions/upload-artifact@v2
with:
name: northstar-launcher
path: |
x64/Release/Northstar.dll
x64/Release/wsock32.dll
x64/Release/NorthstarLauncher.exe
x64/Release/*.txt
build-northstar:
needs: build-launcher
runs-on: ubuntu-20.04
steps:
- name: Download compiled launcher
uses: actions/download-artifact@v2
with:
name: northstar-launcher
path: northstar-launcher
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ env.NORTHSTAR_VERSION }}
path: northstar
- name: Checkout
uses: actions/checkout@v2
with:
repository: R2Northstar/NorthstarMods
ref: ${{ env.NORTHSTAR_VERSION }}
path: northstar-mods
- name: Download repositories
run: |
mv northstar/release/* northstar/.
mkdir -p northstar/R2Northstar/mods
mkdir -p northstar/bin/x64_retail
mv northstar-launcher/wsock32.dll northstar/bin/x64_retail
mv northstar-launcher/* northstar
rsync -avr --exclude="Northstar.Coop" --exclude=".git*" northstar-mods/. northstar/R2Northstar/mods
- name: Cleanup
run: |
rm -rf northstar-launcher
cd northstar && rm -rf .git .github *.md LICENSE
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Northstar.release.${{ env.NORTHSTAR_VERSION }}
path: northstar