mirror of https://github.com/R2Northstar/Northstar
Add build CI
This commit is contained in:
parent
2a57c1ef27
commit
0cd78a9d36
|
@ -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
|
Loading…
Reference in New Issue