2022-09-04 09:47:03 +08:00
|
|
|
name: Build
|
2022-09-04 08:51:47 +08:00
|
|
|
|
2022-09-05 05:00:27 +08:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- '.github/workflows/build.yml'
|
2022-09-05 09:13:57 +08:00
|
|
|
- 'src-tauri/**/*'
|
|
|
|
- 'src/**/*'
|
2022-09-05 05:00:27 +08:00
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- '.github/workflows/build.yml'
|
2022-09-05 09:13:57 +08:00
|
|
|
- 'src-tauri/**/*'
|
|
|
|
- 'src/**/*'
|
2022-09-04 08:51:47 +08:00
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.ref }}-${{ github.workflow }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
2022-09-04 09:46:13 +08:00
|
|
|
build-win:
|
2022-09-04 08:51:47 +08:00
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: setup node
|
|
|
|
uses: actions/setup-node@v1
|
2022-09-04 08:57:56 +08:00
|
|
|
with:
|
|
|
|
node-version: 16
|
2022-09-04 08:51:47 +08:00
|
|
|
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
2022-09-04 08:55:01 +08:00
|
|
|
with:
|
|
|
|
toolchain: stable
|
2022-09-04 08:51:47 +08:00
|
|
|
|
|
|
|
- name: Install deps and build
|
|
|
|
run: yarn && yarn build --debug
|
|
|
|
|
|
|
|
- name: Compress build
|
|
|
|
uses: vimtor/action-zip@v1
|
|
|
|
with:
|
2023-03-06 10:13:09 +08:00
|
|
|
files: src-tauri/target/debug/lang/ src-tauri/target/debug/keys/ src-tauri/target/debug/patch/ src-tauri/target/debug/Cultivation.exe src-tauri/target/debug/bundle/msi/
|
2022-09-05 07:55:38 +08:00
|
|
|
recursive: true
|
2022-09-04 08:51:47 +08:00
|
|
|
dest: Cultivation.zip
|
|
|
|
|
|
|
|
- name: Upload build
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2022-09-05 05:59:05 +08:00
|
|
|
name: CultivationWin
|
2022-09-04 09:46:13 +08:00
|
|
|
path: Cultivation.zip
|
|
|
|
|
|
|
|
build-ubuntu:
|
2022-09-04 10:01:21 +08:00
|
|
|
runs-on: ubuntu-20.04
|
2022-09-04 09:46:13 +08:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: setup node
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 16
|
|
|
|
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
|
2022-09-04 10:01:21 +08:00
|
|
|
- name: Install libraries
|
2022-09-04 10:11:53 +08:00
|
|
|
run: sudo apt install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
|
2022-09-04 10:01:21 +08:00
|
|
|
|
2022-09-04 09:46:13 +08:00
|
|
|
- name: Install deps and build
|
|
|
|
run: yarn && yarn build --debug
|
|
|
|
|
|
|
|
- name: Compress build
|
|
|
|
uses: vimtor/action-zip@v1
|
|
|
|
with:
|
2023-03-06 10:13:09 +08:00
|
|
|
files: src-tauri/target/debug/lang/ src-tauri/target/debug/keys/ src-tauri/target/debug/patch/ src-tauri/target/debug/cultivation
|
2022-09-05 07:55:38 +08:00
|
|
|
recursive: true
|
2022-09-04 09:46:13 +08:00
|
|
|
dest: Cultivation.zip
|
|
|
|
|
|
|
|
- name: Upload build
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2022-09-05 05:59:05 +08:00
|
|
|
name: CultivationLinux
|
2022-09-04 09:46:13 +08:00
|
|
|
path: Cultivation.zip
|