diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index a200f10..3ac8af1 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -7,36 +7,41 @@ jobs: package-linux: runs-on: ubuntu-24.04 env: - PACKAGE_NAME: NovaSwarm-x64-linux-v0.1.0.zip + PACKAGE_NAME: NovaSwarm-x64-linux steps: - uses: actions/checkout@v4 - name: init run: sudo apt update -yqq && sudo apt install -yqq ninja-build xorg-dev libpulse-dev libkpipewire-dev - name: package release - run: cmake -DPACKAGE_NAME=${{ env.PACKAGE_NAME }} -P tools/package_release.cmake + run: cmake -DPACKAGE_NAME="${{ env.PACKAGE_NAME }}-v${{ github.ref_name }}.zip" -P tools/package_release.cmake - name: upload release uses: softprops/action-gh-release@v2 with: - files: ${{ env.PACKAGE_NAME }} + files: "${{ env.PACKAGE_NAME }}-v${{ github.ref_name }}.zip" draft: true fail_on_unmatched_files: true package-windows: runs-on: windows-latest env: - PACKAGE_NAME: NovaSwarm-x64-windows-v0.1.0.zip + PACKAGE_NAME: NovaSwarm-x64-windows steps: - uses: actions/checkout@v4 - name: package release - run: cmake -DPACKAGE_NAME="${{ env.PACKAGE_NAME }}" -P tools/package_release.cmake + run: cmake -DPACKAGE_NAME="${{ env.PACKAGE_NAME }}-v${{ github.ref_name }}.zip" -P tools/package_release.cmake - name: upload release uses: softprops/action-gh-release@v2 with: - files: ${{ env.PACKAGE_NAME }} + files: "${{ env.PACKAGE_NAME }}-v${{ github.ref_name }}.zip" draft: true fail_on_unmatched_files: true package-android: env: - PACKAGE_NAME: NovaSwarm-arm64-android-v0.1.0.apk + PACKAGE_NAME: NovaSwarm-arm64-android + SIGN_ARGS: > + -Pandroid.injected.signing.store.file=./keystore.jks + -Pandroid.injected.signing.key.alias=${{ secrets.ANDROID_KEYSTORE_ALIAS }} + -Pandroid.injected.signing.store.password="${{ secrets.ANDROID_KEYSTORE_PASSWORD }}" + -Pandroid.injected.signing.key.password="${{ secrets.ANDROID_KEYSTORE_PASSWORD }}" runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -44,16 +49,18 @@ jobs: run: | wget https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.tar.gz tar xvzf jdk-17_linux-x64_bin.tar.gz -C /opt + echo ${{ secrets.ANDROID_KEYSTORE_BASE64 }} | base64 -d > src/android/app/keystore.jks + ls src/android/app - name: build APK run: | export JAVA_HOME=$(find /opt -name "jdk-17.*") cd src/android - ./gradlew assembleRelease - mv app/build/outputs/apk/release/app-release-unsigned.apk ../../$PACKAGE_NAME + ./gradlew assembleRelease $SIGN_ARGS + mv app/build/outputs/apk/release/app-release.apk ../../$PACKAGE_NAME-v${{ github.ref_name }}.apk - name: upload release uses: softprops/action-gh-release@v2 with: - files: ${{ env.PACKAGE_NAME }} + files: "${{ env.PACKAGE_NAME }}-v${{ github.ref_name }}.apk" draft: true fail_on_unmatched_files: true package-macos: @@ -61,7 +68,7 @@ jobs: env: CPU_ARCH: arm64 OS_NAME: macos - PACKAGE_NAME: NovaSwarm-arm64-macos-v0.1.0.zip + PACKAGE_NAME: NovaSwarm-arm64-macos-v${{ github.ref_name }}.zip steps: - uses: actions/checkout@v4 - name: init @@ -71,7 +78,7 @@ jobs: - name: upload release uses: softprops/action-gh-release@v2 with: - files: ${{ env.PACKAGE_NAME }} + files: "${{ env.PACKAGE_NAME }}-v${{ github.ref_name }}.zip" draft: true fail_on_unmatched_files: true diff --git a/CMakeLists.txt b/CMakeLists.txt index d7e4c50..62c700c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,8 +6,6 @@ message(STATUS "spaced build version: ${build_version}") project(spaced VERSION ${build_version}) -configure_file(src/package.yml.in "${CMAKE_CURRENT_SOURCE_DIR}/.github/workflows/package.yml" @ONLY) - set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) diff --git a/README.md b/README.md index 5a5c522..b15bc1e 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ 1. Android: 1. arm64 (64 bit ARM) or x64 (64 bit Intel/AMD). -*Note: Adreno GPUs on Android seem to have driver bugs that cause rendering artifacts and can sometimes crash the app.* +*Note: Some GPUs on Android seem to have driver bugs that cause rendering artifacts and can sometimes crash the app.* ### Steps diff --git a/src/package.yml.in b/src/package.yml.in deleted file mode 100644 index 8adfc19..0000000 --- a/src/package.yml.in +++ /dev/null @@ -1,77 +0,0 @@ -name: package -on: - push: - tags: - - 'v*' -jobs: - package-linux: - runs-on: ubuntu-24.04 - env: - PACKAGE_NAME: NovaSwarm-x64-linux-v@PROJECT_VERSION@.zip - steps: - - uses: actions/checkout@v4 - - name: init - run: sudo apt update -yqq && sudo apt install -yqq ninja-build xorg-dev libpulse-dev libkpipewire-dev - - name: package release - run: cmake -DPACKAGE_NAME=${{ env.PACKAGE_NAME }} -P tools/package_release.cmake - - name: upload release - uses: softprops/action-gh-release@v2 - with: - files: ${{ env.PACKAGE_NAME }} - draft: true - fail_on_unmatched_files: true - package-windows: - runs-on: windows-latest - env: - PACKAGE_NAME: NovaSwarm-x64-windows-v@PROJECT_VERSION@.zip - steps: - - uses: actions/checkout@v4 - - name: package release - run: cmake -DPACKAGE_NAME="${{ env.PACKAGE_NAME }}" -P tools/package_release.cmake - - name: upload release - uses: softprops/action-gh-release@v2 - with: - files: ${{ env.PACKAGE_NAME }} - draft: true - fail_on_unmatched_files: true - package-android: - env: - PACKAGE_NAME: NovaSwarm-arm64-android-v@PROJECT_VERSION@.apk - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v4 - - name: init - run: | - wget https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.tar.gz - tar xvzf jdk-17_linux-x64_bin.tar.gz -C /opt - - name: build APK - run: | - export JAVA_HOME=$(find /opt -name "jdk-17.*") - cd src/android - ./gradlew assembleRelease - mv app/build/outputs/apk/release/app-release-unsigned.apk ../../$PACKAGE_NAME - - name: upload release - uses: softprops/action-gh-release@v2 - with: - files: ${{ env.PACKAGE_NAME }} - draft: true - fail_on_unmatched_files: true - package-macos: - runs-on: macos-latest - env: - CPU_ARCH: arm64 - OS_NAME: macos - PACKAGE_NAME: NovaSwarm-arm64-macos-v@PROJECT_VERSION@.zip - steps: - - uses: actions/checkout@v4 - - name: init - run: brew install ninja - - name: package release - run: cmake -DPACKAGE_NAME=${{ env.PACKAGE_NAME }} -P tools/package_release.cmake - - name: upload release - uses: softprops/action-gh-release@v2 - with: - files: ${{ env.PACKAGE_NAME }} - draft: true - fail_on_unmatched_files: true -