2021-08-16 19:42:41 +00:00
|
|
|
name: Build apps
|
2021-08-15 14:26:47 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
[push, workflow_dispatch]
|
|
|
|
|
|
|
|
jobs:
|
2021-08-16 19:42:41 +00:00
|
|
|
buildios:
|
|
|
|
name: Build iOS app
|
|
|
|
runs-on: macos-latest
|
2021-08-16 19:41:32 +00:00
|
|
|
steps:
|
|
|
|
- name: Get repository code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
ref: ios
|
|
|
|
|
2021-08-17 00:07:31 +00:00
|
|
|
- name: Install prerequisites
|
2021-08-17 00:10:34 +00:00
|
|
|
run: npm install cordova cordova-icon -g && xcversion simulators --install="iOS 14.7.1"
|
2021-08-16 19:41:32 +00:00
|
|
|
|
|
|
|
- name: Add iOS platform
|
2021-08-17 00:07:31 +00:00
|
|
|
run: cordova platform add ios
|
2021-08-16 23:42:40 +00:00
|
|
|
|
2021-08-16 19:41:32 +00:00
|
|
|
- name: Build iOS app
|
2021-08-17 00:07:31 +00:00
|
|
|
run: cordova build ios --target iPhone-7
|
2021-08-16 19:41:32 +00:00
|
|
|
|
2021-08-16 20:14:22 +00:00
|
|
|
- name: Make .ipa Archive
|
|
|
|
run: cd platforms/ios/build/emulator && mkdir Payload && mv Kitsune.app Payload && zip -r kitsune-ios.ipa Payload
|
|
|
|
|
|
|
|
- name: Upload iOS app
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: kitsune-ios.ipa
|
|
|
|
path: platforms/ios/build/emulator/kitsune-ios.ipa
|
2021-08-16 19:41:32 +00:00
|
|
|
|
|
|
|
buildnw:
|
2021-08-15 14:31:20 +00:00
|
|
|
name: Build NW.js apps
|
2021-08-15 14:26:47 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Get repository code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2021-08-15 14:45:14 +00:00
|
|
|
- name: Create build directory
|
|
|
|
run: mkdir build
|
2021-08-15 14:39:35 +00:00
|
|
|
|
2021-08-15 16:02:55 +00:00
|
|
|
- name: Download Windows x64 NW.js
|
2021-08-15 14:26:47 +00:00
|
|
|
run: wget https://dl.nwjs.io/v0.55.0/nwjs-v0.55.0-win-x64.zip
|
|
|
|
|
2021-08-15 20:55:45 +00:00
|
|
|
- name: Download Windows ia32 NW.js
|
|
|
|
run: wget https://dl.nwjs.io/v0.55.0/nwjs-v0.55.0-win-ia32.zip
|
2021-08-15 16:02:55 +00:00
|
|
|
|
|
|
|
- name: Download Linux x64 NW.js
|
2021-08-15 14:26:47 +00:00
|
|
|
run: wget https://dl.nwjs.io/v0.55.0/nwjs-v0.55.0-linux-x64.tar.gz
|
|
|
|
|
2021-08-15 20:55:45 +00:00
|
|
|
- name: Download Linux ia32 NW.js
|
|
|
|
run: wget https://dl.nwjs.io/v0.55.0/nwjs-v0.55.0-linux-ia32.tar.gz
|
2021-08-15 16:02:55 +00:00
|
|
|
|
2021-08-15 22:25:23 +00:00
|
|
|
- name: Download MacOS NW.js
|
|
|
|
run: wget https://dl.nwjs.io/v0.55.0/nwjs-v0.55.0-osx-x64.zip
|
|
|
|
|
2021-08-15 16:02:55 +00:00
|
|
|
- name: Extract Windows x64 NW.js
|
|
|
|
run: unzip nwjs-v0.55.0-win-x64.zip
|
|
|
|
|
2021-08-15 20:55:45 +00:00
|
|
|
- name: Extract Windows ia32 NW.js
|
|
|
|
run: unzip nwjs-v0.55.0-win-ia32.zip
|
2021-08-15 16:02:55 +00:00
|
|
|
|
|
|
|
- name: Extract Linux x64 NW.js
|
|
|
|
run: tar -xvf nwjs-v0.55.0-linux-x64.tar.gz
|
|
|
|
|
2021-08-15 20:55:45 +00:00
|
|
|
- name: Extract Linux ia32 NW.js
|
|
|
|
run: tar -xvf nwjs-v0.55.0-linux-ia32.tar.gz
|
2021-08-15 14:31:20 +00:00
|
|
|
|
2021-08-15 22:25:23 +00:00
|
|
|
- name: Extract MacOS NW.js
|
|
|
|
run: unzip nwjs-v0.55.0-osx-x64.zip
|
|
|
|
|
2021-08-15 14:39:35 +00:00
|
|
|
- name: Delete archives
|
2021-08-15 22:25:23 +00:00
|
|
|
run: rm nwjs-v0.55.0-linux-x64.tar.gz nwjs-v0.55.0-win-x64.zip nwjs-v0.55.0-linux-ia32.tar.gz nwjs-v0.55.0-win-ia32.zip nwjs-v0.55.0-osx-x64.zip
|
2021-08-15 14:39:35 +00:00
|
|
|
|
2021-08-15 14:45:14 +00:00
|
|
|
- name: Rename and move NW.js directories
|
2021-08-15 22:32:26 +00:00
|
|
|
run: mv nwjs-v0.55.0-linux-x64 build/KitsuneOffline-linux-x64 && mv nwjs-v0.55.0-win-x64 build/KitsuneOffline-win-x64 && mv nwjs-v0.55.0-linux-ia32 build/KitsuneOffline-linux-ia32 && mv nwjs-v0.55.0-win-ia32 build/KitsuneOffline-win-ia32 && mv nwjs-v0.55.0-osx-x64/nwjs.app build/Kitsune.app
|
2021-08-15 14:39:35 +00:00
|
|
|
|
2021-08-15 15:08:03 +00:00
|
|
|
- name: Create package.nw directories
|
2021-08-15 22:25:23 +00:00
|
|
|
run: mkdir build/KitsuneOffline-linux-x64/package.nw && mkdir build/KitsuneOffline-win-x64/package.nw && mkdir build/KitsuneOffline-linux-ia32/package.nw && mkdir build/KitsuneOffline-win-ia32/package.nw && mkdir build/Kitsune.app/Contents/Resources/app.nw
|
2021-08-15 15:08:03 +00:00
|
|
|
|
2021-08-15 20:55:45 +00:00
|
|
|
- name: Copy logos to NW.js directories
|
2021-08-15 22:25:23 +00:00
|
|
|
run: cp -r logos build/KitsuneOffline-linux-x64/package.nw && cp -r logos build/KitsuneOffline-win-x64/package.nw && cp -r logos build/KitsuneOffline-linux-ia32/package.nw && cp -r logos build/KitsuneOffline-win-ia32/package.nw && cp -r logos build/Kitsune.app/Contents/Resources/app.nw
|
2021-08-15 15:08:03 +00:00
|
|
|
|
2021-08-15 20:55:45 +00:00
|
|
|
- name: Copy package.json to NW.js directories
|
2021-08-15 22:25:23 +00:00
|
|
|
run: cp package.json build/KitsuneOffline-linux-x64/package.nw && cp package.json build/KitsuneOffline-win-x64/package.nw && cp package.json build/KitsuneOffline-linux-ia32/package.nw && cp package.json build/KitsuneOffline-win-ia32/package.nw && cp package.json build/Kitsune.app/Contents/Resources/app.nw
|
2021-08-15 20:55:45 +00:00
|
|
|
|
|
|
|
- name: Rename executables
|
|
|
|
run: mv build/KitsuneOffline-linux-x64/nw build/KitsuneOffline-linux-x64/kitsune && mv build/KitsuneOffline-linux-ia32/nw build/KitsuneOffline-linux-ia32/kitsune && mv build/KitsuneOffline-win-x64/nw.exe build/KitsuneOffline-win-x64/kitsune.exe && mv build/KitsuneOffline-win-ia32/nw.exe build/KitsuneOffline-win-ia32/kitsune.exe
|
2021-08-15 21:27:31 +00:00
|
|
|
|
|
|
|
- name: Create Debian installer file structure
|
|
|
|
run: mkdir build/KitsuneOffline-debian-x64 && mkdir build/KitsuneOffline-debian-x64/usr && mkdir mkdir build/KitsuneOffline-debian-x64/DEBIAN && mkdir build/KitsuneOffline-debian-x64/usr/bin && mkdir build/KitsuneOffline-debian-x64/usr/lib && mkdir build/KitsuneOffline-debian-x64/usr/share && mkdir build/KitsuneOffline-debian-x64/usr/share/applications
|
|
|
|
|
|
|
|
- name: Copy Linux build to Debian installer
|
|
|
|
run: cp -r build/KitsuneOffline-linux-x64 build/KitsuneOffline-debian-x64/usr/lib
|
|
|
|
|
|
|
|
- name: Create Symlink to command
|
|
|
|
run: cd build/KitsuneOffline-debian-x64/usr/bin && ln -s ../lib/KitsuneOffline-linux-x64/kitsune
|
|
|
|
|
|
|
|
- name: Copy control file
|
|
|
|
run: cp DEBIAN/control build/KitsuneOffline-debian-x64/DEBIAN
|
|
|
|
|
|
|
|
- name: Copy desktop file
|
|
|
|
run: cp kitsune.desktop build/KitsuneOffline-debian-x64/usr/share/applications
|
|
|
|
|
2021-08-15 21:35:01 +00:00
|
|
|
- name: Create Debian installer
|
2021-08-15 21:37:33 +00:00
|
|
|
run: cd build && dpkg-deb --build KitsuneOffline-debian-x64
|
2021-08-15 21:35:01 +00:00
|
|
|
|
2021-08-15 20:55:45 +00:00
|
|
|
- name: Create Windows archives
|
|
|
|
run: cd build && zip -r KitsuneOffline-win-x64.zip KitsuneOffline-win-x64 && zip -r KitsuneOffline-win-ia32.zip KitsuneOffline-win-ia32
|
2021-08-15 15:08:03 +00:00
|
|
|
|
2021-08-15 20:55:45 +00:00
|
|
|
- name: Create Linux archives
|
2021-08-15 22:25:23 +00:00
|
|
|
run: cd build && tar -czvf KitsuneOffline-linux-x64.tar.gz KitsuneOffline-linux-x64 && tar -czvf KitsuneOffline-linux-ia32.tar.gz KitsuneOffline-linux-ia32
|
|
|
|
|
2021-08-15 22:40:13 +00:00
|
|
|
- name: Create MacOS archive
|
2021-08-15 22:25:23 +00:00
|
|
|
run: cd build && zip -r KitsuneOffline-osx.zip Kitsune.app
|
2021-08-15 15:08:03 +00:00
|
|
|
|
2021-08-15 20:55:45 +00:00
|
|
|
- name: Upload Windows x64 build
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: KitsuneOffline-win-x64.zip
|
|
|
|
path: build/KitsuneOffline-win-x64.zip
|
|
|
|
|
|
|
|
- name: Upload Linux x64 build
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: KitsuneOffline-linux-x64.tar.gz
|
|
|
|
path: build/KitsuneOffline-linux-x64.tar.gz
|
|
|
|
|
|
|
|
- name: Upload Windows ia32 build
|
2021-08-15 15:14:07 +00:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2021-08-15 20:55:45 +00:00
|
|
|
name: KitsuneOffline-win-ia32.zip
|
|
|
|
path: build/KitsuneOffline-win-ia32.zip
|
2021-08-15 15:14:07 +00:00
|
|
|
|
2021-08-15 20:55:45 +00:00
|
|
|
- name: Upload Linux ia32 build
|
2021-08-15 15:14:07 +00:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2021-08-15 20:55:45 +00:00
|
|
|
name: KitsuneOffline-linux-ia32.tar.gz
|
|
|
|
path: build/KitsuneOffline-linux-ia32.tar.gz
|
2021-08-15 21:35:01 +00:00
|
|
|
|
|
|
|
- name: Upload Debian installer build
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: KitsuneOffline-debian-x64.deb
|
|
|
|
path: build/KitsuneOffline-debian-x64.deb
|
2021-08-15 22:25:23 +00:00
|
|
|
|
|
|
|
- name: Upload MacOS build
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: KitsuneOffline-osx.zip
|
|
|
|
path: build/KitsuneOffline-osx.zip
|