Skip to content

Commit

Permalink
Merge pull request #205 from sotch-pr35mac/pw/release-workflow
Browse files Browse the repository at this point in the history
Added release workflow
  • Loading branch information
sotch-pr35mac authored Oct 22, 2022
2 parents 2fb6eac + f0a3d8d commit 4b73891
Show file tree
Hide file tree
Showing 22 changed files with 111 additions and 6 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,27 @@ on:

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: Prepare Environment
uses: actions/setup-node@v2
with:
node-version: 17
cache: 'npm'
- name: Install Dependencies
run: sudo apt update && sudo apt install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev && make install-dev
- name: Install Dependencies (Ubuntu Only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt update
sudo apt install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
make install-dev
- name: Install Dependencies (macOS & Windows)
if: matrix.platform != 'ubuntu-20.04'
run: make install-dev
- name: Build
run: make build-ci
- name: Test
Expand Down
84 changes: 84 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Release
'on':
release:
- published
jobs:
release:
strategy:
fail-fast: false
matrix:
platform:
- macos-latest
- ubuntu-20.04
- windows-latest
runs-on: '${{ matrix.platform }}'
steps:
- uses: actions/checkout@v2
- name: Prepare Rust Environment (Windows Only)
if: matrix.platform == 'windows-latest'
run: |
rustup target add i686-pc-windows-msvc
rustup target add x86_64-pc-windows-msvc
- name: Prepare Rust Environment (macOS Only)
if: matrix.platform == 'macos-latest'
run: |
rustup target add aarch64-apple-darwin
rustup target add x86_64-apple-darwin
- name: Prepare Node Environment
uses: actions/setup-node@v2
with:
node-version: 17
cache: npm
- name: Install Dependencies (Ubuntu Only)
if: matrix.platform == 'ubuntu-20.04'
run: >
sudo apt update
sudo apt install libwebkit2gtk-4.0-dev build-essential curl wget
libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
make install-dev
- name: Install Dependencies (macOS & Windows)
if: matrix.platform != 'ubuntu-20.04'
run: make install-dev
- name: Build
run: make build
- name: Prepare Tauri Environment
run: cargo install tauri-cli
- name: Build & Package (Windows Only)
if: matrix.platform == 'windows-latest'
run: |
cargo tauri build --target i686-pc-windows-msvc
cargo tauri build --target x86_64-pc-windows-msvc
- name: Build & Package (macOS Only)
if: matrix.platform == 'macos-latest'
run: |
cargo tauri build --target aarch64-apple-darwin
cargo tauri build --target x86_64-apple-darwin
- name: Build & Package (Linux Only)
if: matrix.platform == 'ubuntu-20.04'
run: cargo tauri build
- name: Upload Artifacts (Linux Only)
if: matrix.platform == 'ubuntu-20.04'
uses: actions/upload-artifact@v3
with:
name: Linux Packages
path: >
/home/runner/work/syng/syng/src/native/target/release/bundle/deb/syng_2.0.0_amd64.deb
/home/runner/work/syng/syng/src/native/target/release/bundle/appimage/syng_2.0.0_amd64.AppImage
- name: Upload Artifacts (macOS Only)
if: matrix.platform == 'macos-latest'
uses: actions/upload-artifact@v3
with:
name: macOS Packages
path: >
/Users/runner/work/syng/syng/src/native/target/x86_64-apple-darwin/release/bundle/macos/Syng.app
/Users/runner/work/syng/syng/src/native/target/x86_64-apple-darwin/release/bundle/dmg/Syng_2.0.0_x64.dmg
/Users/runner/work/syng/syng/src/native/target/aarch64-apple-darwin/release/bundle/macos/Syng.app
/Users/runner/work/syng/syng/src/native/target/aarch64-apple-darwin/release/bundle/dmg/Syng_2.0.0_aarch64.dmg
- name: Upload Artifacts (Windows Only)
if: matrix.platform == 'windows-latest'
uses: actions/upload-artifact@v3
with:
name: Windows Packages
path: >
D:\a\syng\syng\src\native\target\x86_64-pc-windows-msvc\release\bundle/msi/Syng_2.0.0_x64_en-US.msi
D:\a\syng\syng\src\native\target\i686-pc-windows-msvc\release\bundle/msi/Syng_2.0.0_x86_en-US.msi
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ All notable changes to this project will be documented in this file. This projec
- Redesigned interface
- Improved startup speed
- Improved search speed and accuracy
- Migrated from Electron to Tauri
- Migrated to PouchDB
- Updated app icon

### Removed
- Startup splash screen
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ build:
npm run build

build-ci:
cd src/native && cargo check
cd src/native && cargo build
npm run build

start:
Expand All @@ -28,3 +28,6 @@ fix-lint:
test:
cd src/native && cargo test
npm test

icon:
cargo tauri icon assets/icon.png
Binary file modified assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/native/icons/128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/native/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/native/icons/32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/native/icons/Square107x107Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/native/icons/Square142x142Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/native/icons/Square150x150Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/native/icons/Square284x284Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/native/icons/Square30x30Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/native/icons/Square310x310Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/native/icons/Square44x44Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/native/icons/Square71x71Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/native/icons/Square89x89Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/native/icons/StoreLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/native/icons/icon.icns
Binary file not shown.
Binary file modified src/native/icons/icon.ico
Binary file not shown.
Binary file modified src/native/icons/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions src/native/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,20 @@ fn main() {
tauri::Builder::default()
.setup(|app| {
let main_window = app.get_window("main").unwrap();
main_window.open_devtools();
let character_window = app.get_window("characters").unwrap();
character_window.open_devtools();

#[cfg(target_os = "macos")]
{
main_window.set_transparent_titlebar(ToolbarThickness::Thick);
character_window.set_transparent_titlebar(ToolbarThickness::Medium);
}

#[cfg(debug_assertions)]
{
main_window.open_devtools();
character_window.open_devtools();
}

let handle = app.handle();
main_window.on_window_event(move |event| {
if let WindowEvent::CloseRequested { .. } = event {
Expand Down

0 comments on commit 4b73891

Please sign in to comment.