2021-08-15 14:31:20 +00:00
|
|
|
name: Build NW.js apps
|
2021-08-15 14:26:47 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
[push, workflow_dispatch]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
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 14:31:20 +00:00
|
|
|
- name: Download Windows 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 14:31:20 +00:00
|
|
|
- name: Extract Windows NW.js
|
2021-08-15 14:26:47 +00:00
|
|
|
run: unzip nwjs-v0.55.0-win-x64.zip
|
|
|
|
|
2021-08-15 14:31:20 +00:00
|
|
|
- name: Download Linux 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 14:31:20 +00:00
|
|
|
- name: Extract Linux NW.js
|
2021-08-15 14:33:39 +00:00
|
|
|
run: tar -xvf nwjs-v0.55.0-linux-x64.tar.gz
|
2021-08-15 14:31:20 +00:00
|
|
|
|
2021-08-15 14:39:35 +00:00
|
|
|
- name: Delete archives
|
|
|
|
run: rm nwjs-v0.55.0-linux-x64.tar.gz nwjs-v0.55.0-win-x64.zip
|
|
|
|
|
2021-08-15 14:45:14 +00:00
|
|
|
- name: Rename and move NW.js directories
|
|
|
|
run: mv nwjs-v0.55.0-linux-x64 build/KitsuneOffline-linux && mv nwjs-v0.55.0-win-x64 build/KitsuneOffline-win
|
2021-08-15 14:39:35 +00:00
|
|
|
|
2021-08-15 15:08:03 +00:00
|
|
|
- name: List files to make sure we are on the right track, which we should be!
|
2021-08-15 14:45:14 +00:00
|
|
|
run: echo "Build directory:" && ls -A build && echo "Repository:" && ls -A
|
2021-08-15 15:08:03 +00:00
|
|
|
|
|
|
|
- name: Create package.nw directories
|
|
|
|
run: mkdir build/KitsuneOffline-linux/package.nw && mkdir build/KitsuneOffline-win/package.nw
|
|
|
|
|
|
|
|
- name: Copy code to NW.js directories
|
|
|
|
run: cp -r logos build/KitsuneOffline-linux/package.nw && cp package.json build/KitsuneOffline-linux/package.nw && cp -r logos build/KitsuneOffline-win/package.nw && cp package.json build/KitsuneOffline-win/package.nw
|
|
|
|
|
|
|
|
- name: create Windows archive
|
|
|
|
run: cd build && zip -r KitsuneOffline-win.zip KitsuneOffline-win
|
|
|
|
|
|
|
|
- name: create Linux archive
|
|
|
|
run: cd build && tar -czvf KitsuneOffline-linux.tar.gz KitsuneOffline-linux
|
|
|
|
|
|
|
|
- name: list files again
|
|
|
|
run: echo "Build directory:" && ls -A build && echo "Repository:" && ls -A
|
|
|
|
|