Skip to content

fix: xmake use now

fix: xmake use now #44

Workflow file for this run

name: release
on:
push:
tags:
- 'v*'
jobs:
build-windows:
name: windows build
runs-on: windows-latest
steps:
- name: Setup Windows 10 SDK version 10.0.20348.0
uses: GuillaumeFalourd/[email protected]
with:
sdk-version: 20348
- name: Install NSIS
run: |
iwr -useb get.scoop.sh -outfile 'install.ps1'
.\install.ps1 -RunAsAdmin
scoop update
scoop install main/xmake
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: pre-repo
shell: powershell
run: |
$env:path+=";$Home\scoop\shims"
xrepo add-repo local https://github.com/zeromake/xrepo.git
- name: build-x86_64
env:
VERSION: ${{ github.ref_name }}
shell: powershell
run: |
$env:path+=";$Home\scoop\shims"
xmake f -c -y
xmake build -y onscripter
- uses: actions/upload-artifact@v3
with:
name: onscripter-windows-${{ github.run_id }}
path: |
dist/onscripter-windows-x86_64.exe
build-osx:
name: macos build
runs-on: macos-latest
steps:
- name: install-xmake
run: |
brew install xmake
xmake --version
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: pre-repo
run: |
xrepo add-repo local https://github.com/zeromake/xrepo.git
- name: build-x64
env:
VERSION: ${{ github.ref_name }}
run: |
xmake f -c -y
xmake build -y onscripter
- name: build-arm64
env:
VERSION: ${{ github.ref_name }}
ARCH: arm64
run: |
xmake f -a arm64 -c -y
xmake build -y onscripter
- name: cert
env:
CERT_TEXT: ${{ secrets.CERT_TEXT }}
run: |
cd project/android
echo "org.gradle.java.home=$JAVA_HOME_11_X64" >> gradle.properties
echo $CERT_TEXT > cert.txt
cat cert.txt | base64 -d > cert.tar.xz
tar -xf cert.tar.xz
rm cert.tar.xz cert.txt
ls -lh keystore.properties release.keystore
cd ../../
- name: build-arm-so
env:
VERSION: ${{ github.ref_name }}
run: |
xmake f -p android -a armeabi-v7a --ndk_sdkver=16 --ndk=${ANDROID_HOME}/ndk/23.2.8568313 -y -c
xmake build -y onscripter
- name: build-arm64-so
env:
VERSION: ${{ github.ref_name }}
run: |
xmake f -p android -a arm64-v8a --ndk_sdkver=21 --ndk=${ANDROID_NDK} -y -c
xmake build -y onscripter
- name: build-apk
run: |
export JAVA_HOME=$JAVA_HOME_11_X64
cd project/android
./gradlew assembleRelease
cp ./app/build/outputs/apk/release/app-release.apk ../../dist/onscripter-release.apk
cd ../../
- uses: actions/upload-artifact@v3
with:
name: onscripter-osx-${{ github.run_id }}
path: |
dist/onscripter-darwin-x86_64
dist/onscripter-darwin-arm64
dist/onscripter-release.apk
update-release:
runs-on: ubuntu-latest
needs: [build-osx, build-windows]
steps:
- uses: actions/download-artifact@v3
with:
name: onscripter-windows-${{ github.run_id }}
path: dist
- uses: actions/download-artifact@v3
with:
name: onscripter-osx-${{ github.run_id }}
path: dist
- name: list file
run: |
ls -R
- name: update
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist/onscripter-windows-x86_64.exe
dist/onscripter-darwin-x86_64
dist/onscripter-darwin-arm64
dist/onscripter-release.apk