mirror of
https://github.com/R2Northstar/Northstar
synced 2025-09-16 14:10:48 +02:00
Compare commits
9 Commits
v1.19.9
...
build/use-
Author | SHA1 | Date | |
---|---|---|---|
![]() |
956839c4e2 | ||
![]() |
de87f41b45 | ||
![]() |
d6d2dfe47d | ||
![]() |
c829a40caa | ||
![]() |
a11a37e710 | ||
![]() |
72e8e50d77 | ||
![]() |
8fb1f315bb | ||
![]() |
4dccb376ec | ||
![]() |
ec0491e1e3 |
5
.github/workflows/add-to-project.yml
vendored
5
.github/workflows/add-to-project.yml
vendored
@@ -4,6 +4,9 @@ on:
|
||||
issues:
|
||||
types:
|
||||
- opened
|
||||
pull_request_target:
|
||||
types:
|
||||
- opened
|
||||
|
||||
jobs:
|
||||
add-to-project:
|
||||
@@ -14,4 +17,4 @@ jobs:
|
||||
with:
|
||||
project-url: "https://github.com/orgs/R2Northstar/projects/3"
|
||||
github-token: "${{ secrets.PROJECT_BOARD_TOKEN }}"
|
||||
|
||||
|
||||
|
42
.github/workflows/build.yml
vendored
42
.github/workflows/build.yml
vendored
@@ -20,6 +20,15 @@ jobs:
|
||||
build-northstar:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout release files
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ env.NORTHSTAR_VERSION }}
|
||||
path: northstar
|
||||
- name: Wait for launcher release build to be ready
|
||||
timeout-minutes: 30 # Only wait for 30 minutes. If we take longer, something probably broke
|
||||
run:
|
||||
bash northstar/wait_for_launcher_dl.sh $NORTHSTAR_VERSION
|
||||
- name: Download compiled launcher
|
||||
run:
|
||||
wget "https://github.com/R2Northstar/NorthstarLauncher/releases/download/${{ env.NORTHSTAR_VERSION }}/northstar-launcher.zip"
|
||||
@@ -29,11 +38,6 @@ jobs:
|
||||
- name: Download compiled stubs
|
||||
run:
|
||||
wget "https://github.com/R2Northstar/NorthstarStubs/releases/download/v1/NorthstarStubs.zip"
|
||||
- name: Checkout release files
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ env.NORTHSTAR_VERSION }}
|
||||
path: northstar
|
||||
- name: Checkout core mods
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
@@ -53,17 +57,15 @@ jobs:
|
||||
git ls-tree -r $NORTHSTAR_VERSION --name-only | xargs -L1 md5sum >> md5sum.txt
|
||||
- name: Make folder structure
|
||||
run: |
|
||||
mv -v northstar/release/* northstar/.
|
||||
rm -d northstar/release
|
||||
mkdir -p northstar/R2Northstar/mods
|
||||
mkdir -p northstar/R2Northstar/plugins
|
||||
mkdir -p northstar/bin/x64_dedi
|
||||
mkdir -p northstar/release/R2Northstar/mods
|
||||
mkdir -p northstar/release/R2Northstar/plugins
|
||||
mkdir -p northstar/release/bin/x64_dedi
|
||||
|
||||
unzip northstar-discord-rpc.zip -d northstar/R2Northstar/plugins
|
||||
|
||||
unzip NorthstarStubs.zip -d northstar/bin/x64_dedi
|
||||
unzip northstar-discord-rpc.zip -d northstar/release/R2Northstar/plugins
|
||||
|
||||
unzip NorthstarStubs.zip -d northstar/release/bin/x64_dedi
|
||||
unzip northstar-launcher.zip -d northstar
|
||||
rsync -avr --exclude="Northstar.Coop" --exclude=".git*" northstar-mods/. northstar/R2Northstar/mods
|
||||
rsync -avr --exclude="Northstar.Coop" --exclude=".git*" northstar-mods/. northstar/release/R2Northstar/mods
|
||||
- name: Checkout Navmesh repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
@@ -72,13 +74,13 @@ jobs:
|
||||
path: northstar-navs
|
||||
- name: Navmeshes setup
|
||||
run: |
|
||||
mkdir -p northstar/R2Northstar/mods/Northstar.CustomServers/mod/maps
|
||||
mv -v northstar-navs/graphs northstar/R2Northstar/mods/Northstar.CustomServers/mod/maps
|
||||
mv -v northstar-navs/navmesh northstar/R2Northstar/mods/Northstar.CustomServers/mod/maps
|
||||
mkdir -p northstar/release/R2Northstar/mods/Northstar.CustomServers/mod/maps
|
||||
mv -v northstar-navs/graphs northstar/release/R2Northstar/mods/Northstar.CustomServers/mod/maps
|
||||
mv -v northstar-navs/navmesh northstar/release/R2Northstar/mods/Northstar.CustomServers/mod/maps
|
||||
- name: Cleanup root Northstar repository files
|
||||
working-directory: northstar
|
||||
run: |
|
||||
rm -rf .git .github .gitignore *.md LICENSE thunderstore .ci.env.example
|
||||
rm -rf .git .github .gitignore *.md LICENSE thunderstore .ci.env.example *.sh
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
@@ -86,7 +88,7 @@ jobs:
|
||||
path: northstar
|
||||
- name: Create zip to upload
|
||||
run: |
|
||||
cd northstar/
|
||||
cd northstar/release/
|
||||
zip --recurse-paths --quiet Northstar.release.${{ env.NORTHSTAR_VERSION }}.zip .
|
||||
mv Northstar.release.${{ env.NORTHSTAR_VERSION }}.zip ../
|
||||
- name: Compute SHA-512 checksum
|
||||
@@ -138,7 +140,7 @@ jobs:
|
||||
- name: Make package structure
|
||||
run: |
|
||||
mkdir -p thunderstore/dist/Northstar
|
||||
mv -v northstar/* thunderstore/dist/Northstar
|
||||
mv -v northstar/release/* thunderstore/dist/Northstar
|
||||
wget -O thunderstore/icon.png https://raw.githubusercontent.com/R2Northstar/Northstar/main/thunderstore/icon.png
|
||||
wget -O thunderstore/README.md https://raw.githubusercontent.com/R2Northstar/Northstar/main/thunderstore/README.md
|
||||
|
||||
|
26
wait_for_launcher_dl.sh
Executable file
26
wait_for_launcher_dl.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if contains command line arg
|
||||
if [ -z "$1" ]; then
|
||||
echo "Missing command-line argument."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
url="https://github.com/R2Northstar/NorthstarLauncher/releases/download/$1/northstar-launcher.zip"
|
||||
wait_time_seconds=60
|
||||
|
||||
# Loop until the response code changes
|
||||
while true; do
|
||||
response=$(curl --silent --output /dev/null --write-out "%{http_code}" $url)
|
||||
if [ $response -eq 404 ]; then
|
||||
echo "Response is 404. Retrying in $wait_time_seconds seconds."
|
||||
sleep $wait_time_seconds
|
||||
else
|
||||
echo "Site is accessible with response code $response."
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# 10 second sleep just in case we hit some weird race condition
|
||||
# where files are still being uploaded but release is done
|
||||
sleep 10
|
Reference in New Issue
Block a user