v1.17.4 #44
Workflow file for this run
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
name: build | |
on: | |
release: | |
types: [published] | |
env: | |
NORTHSTAR_VERSION: ${{ github.event.release.tag_name }} | |
jobs: | |
build-northstarcn: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout binary | |
uses: actions/checkout@v4 | |
with: | |
repository: R2NorthstarCN/NorthstarCN_Binaries | |
ref: "main" # ${{ env.NORTHSTAR_VERSION }} | |
path: northstar-launcher | |
- name: Download compiled stubs | |
run: | |
wget "https://github.com/R2Northstar/NorthstarStubs/releases/download/v1/NorthstarStubs.zip" | |
- name: Checkout core mods | |
uses: actions/checkout@v4 | |
with: | |
repository: R2NorthstarCN/NorthstarMods | |
ref: "main" # ${{ env.NORTHSTAR_VERSION }} | |
path: northstar-mods | |
- name: Update mod version info | |
run: | | |
export MOD_VERSION=$(echo $NORTHSTAR_VERSION | awk '{match($0,/[0-9]+\.[0-9]+\.[0-9]+/,a);print a[0]}') | |
cat <<< $(jq ".Version = \"${MOD_VERSION}\"" northstar-mods/Northstar.Client/mod.json) > northstar-mods/Northstar.Client/mod.json | |
cat <<< $(jq ".Version = \"${MOD_VERSION}\"" northstar-mods/Northstar.Custom/mod.json) > northstar-mods/Northstar.Custom/mod.json | |
cat <<< $(jq ".Version = \"${MOD_VERSION}\"" northstar-mods/Northstar.CustomServers/mod.json) > northstar-mods/Northstar.CustomServers/mod.json | |
- name: Make folder structure | |
run: | | |
mkdir -p northstar/R2Northstar/mods | |
mkdir -p northstar/R2Northstar/plugins | |
mkdir -p northstar/bin/x64_retail | |
mv -v northstar-launcher/placeholder_playerdata.pdata northstar/R2Northstar | |
mv -v northstar-launcher/wsock32.dll northstar/bin/x64_retail | |
unzip NorthstarStubs.zip -d northstar/bin/x64_dedi | |
mv -v northstar-launcher/* northstar | |
rsync -avr --exclude="Northstar.Coop" --exclude=".git*" northstar-mods/. northstar/R2Northstar/mods | |
- name: Cleanup Northstar repository files | |
working-directory: northstar | |
run: | | |
rm -rf .git .github .gitignore *.md LICENSE thunderstore .ci.env.example | |
rm -rf R2Northstar/mods/LICENSE R2Northstar/mods/*.md | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Northstar.release.${{ env.NORTHSTAR_VERSION }} | |
path: northstar | |
- name: Create ZIP | |
run: | | |
cd northstar ; zip -r ../northstar.zip . * ; cd .. | |
- name: Upload release assets | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./northstar.zip | |
asset_name: ${{ env.NORTHSTAR_VERSION }}.zip | |
asset_content_type: application/zip |