Skip to content

Commit

Permalink
Update build script
Browse files Browse the repository at this point in the history
  • Loading branch information
qu1ck committed Nov 14, 2024
1 parent 9dbb3fc commit 22edb5b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
30 changes: 20 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
rust_target: aarch64-apple-darwin
- os: windows-latest
rust_target: x86_64-pc-windows-msvc
- os: windows-latest
rust_target: aarch64-pc-windows-msvc

runs-on: ${{ matrix.platform.os }}
steps:
Expand All @@ -59,12 +61,8 @@ jobs:
cache: 'npm'

- name: 'Setup Rust'
if: matrix.platform.rust_target == 'aarch64-apple-darwin'
run: rustup target add aarch64-apple-darwin

- name: "Setup Rust"
if: matrix.platform.rust_target == 'x86_64-apple-darwin'
run: rustup target add x86_64-apple-darwin
if: matrix.platform.rust_target == 'aarch64-apple-darwin' || matrix.platform.rust_target == 'x86_64-apple-darwin' || matrix.platform.rust_target == 'aarch64-pc-windows-msvc'
run: rustup target add ${{matrix.platform.rust_target}}

- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -76,26 +74,38 @@ jobs:
if: matrix.platform.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf libasound2-dev libfontconfig-dev
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libasound2-dev libfontconfig-dev
- name: install npm packages
run: npm ci

- uses: JonasKruckenberg/tauri-build@v1
- uses: tauri-apps/tauri-action@v0
id: tauri_build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
target: ${{ matrix.platform.rust_target }}
args: --target ${{ matrix.platform.rust_target }}

# - uses: JonasKruckenberg/tauri-build@v1
# id: tauri_build
# with:
# projectPath: '.'
# runner: npm run
# args: --
# target: ${{ matrix.platform.rust_target }}

- name: Git status and version
run: |
git status
git describe --tags --dirty --always
git diff
echo ${{ steps.tauri_build.outputs.artifactPaths }}
# The artifacts output can now be used to upload the artifacts
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.platform.rust_target }}
path: "${{ join(fromJSON(steps.tauri_build.outputs.artifacts), '\n') }}"
path: "${{ join(fromJSON(steps.tauri_build.outputs.artifactPaths), '\n') }}"

- name: pack webapp
if: matrix.platform.os == 'ubuntu-latest'
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"type": "module",
"scripts": {
"tauri-dev": "WEBKIT_DISABLE_DMABUF_RENDERER=1 tauri dev",
"tauri": "tauri",
"build": "tauri build",
"build-bin": "tauri build -b",
"webpack-serve": "webpack serve --config webpack.dev.js",
Expand Down

0 comments on commit 22edb5b

Please sign in to comment.