Skip to content

Commit

Permalink
tauri v2
Browse files Browse the repository at this point in the history
  • Loading branch information
0-don committed Nov 11, 2024
1 parent d533da6 commit 9fd13fe
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 18 deletions.
37 changes: 24 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ concurrency:
env:
ARCH: x86_64
DEPENDENCIES_ARCH: "'libappindicator-gtk3' 'webkit2gtk' 'gtk3' 'xdotool'"
DEPENDENCIES_RPM: "javascriptcoregtk4.0, webkit2gtk4.0, libxdo, libappindicator-gtk3, xdotool"
DEPENDENCIES_RPM: "javascriptcoregtk4.1, webkit2gtk4.1, libxdo, libappindicator-gtk3, xdotool"
jobs:
setup:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
name: ${{ steps.get-package.outputs.name }}
name_bin: ${{ steps.get-package.outputs.name }}-bin
Expand All @@ -31,7 +31,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: lts/*
- name: get package info
id: get-package
run: |
Expand All @@ -48,7 +48,15 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-latest, windows-latest]
include:
- platform: "macos-latest" # for Arm based macs (M1 and above).
args: "--target aarch64-apple-darwin"
- platform: "macos-latest" # for Intel based macs.
args: "--target x86_64-apple-darwin"
- platform: "ubuntu-22.04" # for Tauri v1 you could replace this with ubuntu-20.04.
args: ""
- platform: "windows-latest"
args: ""
runs-on: ${{ matrix.platform }}
steps:

Expand All @@ -57,22 +65,25 @@ jobs:
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
node-version: lts/*

- name: install rust stable
uses: dtolnay/rust-toolchain@stable
with:
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above.
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev libxcb-shape0-dev libxcb-xfixes0-dev libxdo-dev libssl1.1
sudo apt-get install -y libgtk-3-dev libappindicator3-dev librsvg2-dev libxcb-shape0-dev libxcb-xfixes0-dev patchelf libxdo-dev libssl1.1 libjavascriptcoregtk-4.1-dev
- name: install frontend dependencies
run: yarn install

- name: Set NO_STRIP environment variable
if: matrix.platform == 'ubuntu-latest' || matrix.platform == 'macos-latest'
if: matrix.platform == 'ubuntu-22.04' || matrix.platform == 'macos-latest'
run: echo "NO_STRIP=true" >> $GITHUB_ENV


Expand All @@ -88,7 +99,7 @@ jobs:


- name: copy deb package && create PKGBUILD file (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
if: matrix.platform == 'ubuntu-22.04'
run: |
mkdir -p ${{ needs.setup.outputs.name_bin }}
cp -fr ${{ needs.setup.outputs.deb_pkg_path }}${{ needs.setup.outputs.deb_pkg_name }} ${{ needs.setup.outputs.name_bin }}/${{ needs.setup.outputs.deb_pkg_renamed }}
Expand Down Expand Up @@ -116,15 +127,15 @@ jobs:
cat ${{ needs.setup.outputs.name_bin }}/PKGBUILD
- name: create arch package (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
if: matrix.platform == 'ubuntu-22.04'
uses: 2m/arch-pkgbuild-builder@v1.17
with:
debug: true
target: pkgbuild
pkgname: ${{ needs.setup.outputs.name_bin }}/

# - name: copy deb package && create rpm.spec file (ubuntu only)
# if: matrix.platform == 'ubuntu-latest'
# if: matrix.platform == 'ubuntu-22.04'
# run: |
# mkdir -p ${{ needs.setup.outputs.name_bin }}
# cp -fr ${{ needs.setup.outputs.deb_pkg_path }}/${{ needs.setup.outputs.deb_pkg_name }} ${{ needs.setup.outputs.name_bin }}/${{ needs.setup.outputs.deb_pkg_renamed }}
Expand Down Expand Up @@ -159,14 +170,14 @@ jobs:
# cat ${{ needs.setup.outputs.name_bin }}/rpm.spec

# - name: createa rpm package (ubuntu only)
# if: matrix.platform == 'ubuntu-latest'
# if: matrix.platform == 'ubuntu-22.04'
# uses: Antikythera/build-rpm@latest
# with:
# spec_file: ${{ needs.setup.outputs.name_bin }}/rpm.spec
# sources: ${{ needs.setup.outputs.name_bin }}/${{ needs.setup.outputs.deb_pkg_renamed }}

- name: upload arch && rpm release (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
if: matrix.platform == 'ubuntu-22.04'
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clippy",
"version": "1.2.9",
"version": "1.3.0",
"description": "Clipboard Manager built with Rust & Typescript",
"license": "MIT",
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "clippy"
version = "1.2.9"
version = "1.3.0"
description = "Clipboard Manager built with Rust & Typescript"
authors = ["0-don"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "clippy",
"version": "1.2.9",
"version": "1.3.0",
"identifier": "clippy",
"build": {
"beforeDevCommand": "npm run dev",
Expand Down

0 comments on commit 9fd13fe

Please sign in to comment.