Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e12e860ef9 | |||
| feb5713dc1 | |||
| 77bdd61c91 |
2 changed files with 57 additions and 3 deletions
57
.github/workflows/build.yml
vendored
57
.github/workflows/build.yml
vendored
|
|
@ -18,6 +18,11 @@ jobs:
|
|||
- name: Check out repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Update packages
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
|
||||
- name: Set up pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
|
|
@ -29,9 +34,7 @@ jobs:
|
|||
# https://github.com/tauri-apps/tauri-action?tab=readme-ov-file#usage
|
||||
# https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/customizing-github-hosted-runners#installing-software-on-ubuntu-runners
|
||||
- name: Install tauri dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install libwebkit2gtk-4.1-dev
|
||||
run: sudo apt install libwebkit2gtk-4.1-dev
|
||||
|
||||
- name: Build
|
||||
run: ./meta/build
|
||||
|
|
@ -69,12 +72,58 @@ jobs:
|
|||
target/release/gdn-cli.exe
|
||||
target/release/gdn-app.exe
|
||||
|
||||
build-android:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up env vars
|
||||
run: echo "NDK_HOME=$ANDROID_NDK_HOME" >> $GITHUB_ENV
|
||||
|
||||
- name: Update packages
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
|
||||
- name: Set up pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 10
|
||||
|
||||
# https://v2.tauri.app/start/prerequisites/#android
|
||||
- name: Set up rust
|
||||
run: |
|
||||
rustup update
|
||||
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
|
||||
|
||||
# https://v2.tauri.app/distribute/sign/android/
|
||||
- name: Set up Android signing
|
||||
run: |
|
||||
cd gdn-app/src-tauri/gen/android
|
||||
echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" > key.properties
|
||||
echo "password=${{ secrets.ANDROID_KEY_PASSWORD }}" >> key.properties
|
||||
base64 -d <<< "${{ secrets.ANDROID_KEY_BASE64 }}" > $RUNNER_TEMP/keystore.jks
|
||||
echo "storeFile=$RUNNER_TEMP/keystore.jks" >> key.properties
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
export NDK_HOME="$ANDROID_NDK_HOME"
|
||||
./meta/build-android
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: gdn-android
|
||||
path: target/release/gdn-app.apk
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
needs:
|
||||
- build-linux
|
||||
- build-windows
|
||||
- build-android
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
|
|
@ -85,6 +134,7 @@ jobs:
|
|||
run: |
|
||||
zip -r gdn-linux.zip gdn-linux
|
||||
zip -r gdn-windows.zip gdn-windows
|
||||
mv gdn-android/gdn-app.apk gdn-android.apk
|
||||
|
||||
- name: Create new release
|
||||
uses: softprops/action-gh-release@v2
|
||||
|
|
@ -93,3 +143,4 @@ jobs:
|
|||
files: |
|
||||
gdn-linux.zip
|
||||
gdn-windows.zip
|
||||
gdn-android.apk
|
||||
|
|
|
|||
3
rust-toolchain.toml
Normal file
3
rust-toolchain.toml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[toolchain]
|
||||
# https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md#rust-tools
|
||||
channel = "1.86.0"
|
||||
Loading…
Add table
Add a link
Reference in a new issue