release #46
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: release | |
on: | |
workflow_dispatch: | |
jobs: | |
mac_build: | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: build | |
run: | | |
brew install scons | |
cp build/build_macos.sh . | |
sudo chmod +x build_macos.sh | |
./build_macos.sh ci | |
cd release | |
tar -czf ../mac_release.tar.gz * | |
cd .. | |
curl -u "${{secrets.CIFTP}}" -s -T mac_release.tar.gz ftp://nvgt.gg | |
linux_build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: build | |
run: | | |
sudo chmod +x build/build_linux.sh | |
./build/build_linux.sh ci | |
cd release | |
tar -czf ../linux_release.tar.gz * | |
cd .. | |
curl -u "${{secrets.CIFTP}}" -s -T linux_release.tar.gz ftp://nvgt.gg | |
android_build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
- uses: nttld/setup-ndk@v1 | |
with: | |
ndk-version: r25c | |
link-to-sdk: true | |
add-to-path: true | |
- name: set_version | |
run: | | |
python3 build/ci_set_version.py | |
- name: build | |
run: | | |
curl -s -O https://nvgt.gg/droidev.zip | |
mkdir -p droidev | |
cd droidev | |
unzip -q ../droidev.zip | |
cd ../jni | |
echo "${{secrets.ANDROID_RUNNER_KEYSTORE}}" > android_enc.keystore | |
cat android_enc.keystore | base64 -d > android.keystore | |
./gradlew assembleRunnerRelease AssembleStubRelease --no-daemon -Pandroid.injected.signing.store.file=android.keystore -Pandroid.injected.signing.store.password=${{secrets.ANDROID_RUNNER_KEYSTORE_PW}} -Pandroid.injected.signing.key.alias=app -Pandroid.injected.signing.key.password="${{secrets.ANDROID_RUNNER_KEYSTORE_PW}}" | |
mv build/outputs/apk/runner/release/nvgt-runner-release.apk ../nvgt_$nvgt_version.apk | |
cd .. | |
curl -u "${{secrets.CIFTP}}" -s -T nvgt_$nvgt_version.apk ftp://nvgt.gg | |
curl -u "${{secrets.CIFTP}}" -s -T release/stub/nvgt_android.bin ftp://nvgt.gg | |
windows_build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: build | |
run: | | |
pip3 install scons | |
choco install -y upx | |
curl -s -O https://nvgt.gg/windev.zip | |
7z x windev.zip -owindev | |
scons -s no_upx=0 | |
cd release | |
tar -czf ../windows_release.tar.gz * | |
cd .. | |
curl -u "${{secrets.CIFTP}}" -s -T windows_release.tar.gz ftp://nvgt.gg | |
windows_package: | |
runs-on: windows-latest | |
needs: ["android_build", "linux_build", "mac_build", "windows_build"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: package | |
run: | | |
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/mac_release.tar.gz | |
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/linux_release.tar.gz | |
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/windows_release.tar.gz | |
mkdir linux_release | |
tar -xzf linux_release.tar.gz -C linux_release | |
mkdir mac_release | |
tar -xzf mac_release.tar.gz -C mac_release | |
tar -xzf windows_release.tar.gz -C release | |
cd doc | |
pip3 install -r requirements.txt | |
cd OSL | |
python3 make_osl_document.py | |
cd .. | |
python3 docgen.py | |
cd .. | |
cp -r linux_release/lib release/lib_linux | |
cp linux_release/stub/* release/stub | |
cp -r mac_release/lib release/lib_mac | |
cp mac_release/stub/* release/stub | |
curl -s -o release/stub/nvgt_android.bin -u "${{secrets.CIFTP}}" ftp://nvgt.gg/nvgt_android.bin | |
cd install | |
iscc nvgt.iss | |
python3 upload_windows_installer.py ${{secrets.CIFTP}} | |
mac_package: | |
runs-on: macos-latest | |
needs: ["android_build", "linux_build", "mac_build", "windows_build"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: package | |
run: | | |
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/mac_release.tar.gz | |
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/linux_release.tar.gz | |
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/windows_release.tar.gz | |
mkdir linux_release | |
tar -xzf linux_release.tar.gz -C linux_release | |
mkdir windows_release | |
tar -xzf windows_release.tar.gz -C windows_release | |
tar -xzf mac_release.tar.gz -C release | |
cd doc | |
pip3 install --user -r requirements.txt --break-system-packages | |
cd OSL | |
python3 make_osl_document.py | |
cd .. | |
python3 docgen.py | |
cd .. | |
cp -r linux_release/lib release/lib_linux | |
cp linux_release/stub/* release/stub | |
cp -r windows_release/lib release/lib_windows | |
cp windows_release/stub/* release/stub | |
curl -s -o release/stub/nvgt_android.bin -u "${{secrets.CIFTP}}" ftp://nvgt.gg/nvgt_android.bin | |
cd install | |
python3 make_dmg.py ../release ${{secrets.CIFTP}} | |
linux_package: | |
runs-on: ubuntu-latest | |
needs: ["android_build", "linux_build", "mac_build", "windows_build"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set_version | |
run: | | |
python3 build/ci_set_version.py | |
- name: package | |
run: | | |
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/mac_release.tar.gz | |
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/linux_release.tar.gz | |
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/windows_release.tar.gz | |
mkdir mac_release | |
tar -xzf mac_release.tar.gz -C mac_release | |
mkdir windows_release | |
tar -xzf windows_release.tar.gz -C windows_release | |
tar -xzf linux_release.tar.gz -C release | |
cd doc | |
pip3 install --user -r requirements.txt | |
cd OSL | |
python3 make_osl_document.py | |
cd .. | |
python3 docgen.py | |
cd .. | |
cp -r mac_release/lib release/lib_mac | |
cp mac_release/stub/* release/stub | |
cp -r windows_release/lib release/lib_windows | |
cp windows_release/stub/* release/stub | |
curl -s -o release/stub/nvgt_android.bin -u "${{secrets.CIFTP}}" ftp://nvgt.gg/nvgt_android.bin | |
cd release | |
tar -czf "../nvgt_$nvgt_version.tar.gz" * | |
cd .. | |
curl -u "${{secrets.CIFTP}}" -s -T "nvgt_$nvgt_version.tar.gz" ftp://nvgt.gg | |
final_package: | |
runs-on: ubuntu-latest | |
needs: ["windows_package", "mac_package", "linux_package"] | |
if: github.ref_name == 'main' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set_version | |
run: | | |
python3 build/ci_set_version.py | |
- name: publish | |
run: | | |
curl -H "X-Auth: ${{secrets.CIPHP}}" -s "https://nvgt.gg/ci/release_complete.php?ver=$nvgt_version" |