Skip to content

Commit

Permalink
Linux support (#3)
Browse files Browse the repository at this point in the history
Added support for the Linux platform.

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: atampy25 <[email protected]>
  • Loading branch information
3 people authored Aug 30, 2024
1 parent e430d73 commit e58b265
Show file tree
Hide file tree
Showing 45 changed files with 1,331 additions and 532 deletions.
30 changes: 30 additions & 0 deletions .github/actions/update-versions/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "Update versions"
description: "Update all project versions"
inputs:
version:
description: "The version to update to"
required: true
default: "unknown"
runs:
using: "composite"
steps:
- name: Update package.json version
uses: jossef/action-set-json-field@v2
with:
file: "package.json"
field: "version"
value: ${{ inputs.version }}

- name: Update Cargo.toml version
uses: colathro/[email protected]
with:
file: "src-tauri/Cargo.toml"
key: "package.version"
value: ${{ inputs.version }}

- name: Update tauri.conf.json version
uses: jossef/action-set-json-field@v2
with:
file: "src-tauri/tauri.conf.json"
field: "package.version"
value: ${{ inputs.version }}
111 changes: 48 additions & 63 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,77 +5,62 @@ on:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:
build:
runs-on: windows-latest
build:
strategy:
fail-fast: false
matrix:
include:
- platform: "ubuntu-22.04"
- platform: "windows-latest"

steps:
- uses: actions/checkout@v2
with:
ref: "main"
fetch-depth: 0
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4

- name: Get latest tag
id: latestTag
uses: "WyriHaximus/[email protected]"
with:
fallback: unknown
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Prepare Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: x86_64-pc-windows-msvc
default: true
components: clippy, rustfmt
- name: Setup Rust
uses: dtolnay/rust-toolchain@nightly
with:
components: 'clippy, rustfmt'

- name: Rust cache
uses: Swatinem/[email protected]
with:
workspaces: "src-tauri -> target"
- name: Rust cache
uses: Swatinem/[email protected]
with:
workspaces: "src-tauri -> target"

- name: Install dependencies
run: |
yarn set version 4.0.2
yarn
- name: Install build dependencies (Ubuntu only)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: Update package.json version
uses: jossef/action-set-json-field@v2
with:
file: "package.json"
field: "version"
value: ${{ steps.latestTag.outputs.tag }}
- name: Install front-end dependencies
run: |
yarn set version 4.0.2
yarn
- name: Update Cargo.toml version
uses: colathro/[email protected]
with:
file: "src-tauri/Cargo.toml"
key: "package.version"
value: ${{ steps.latestTag.outputs.tag }}
- name: Disable updater
uses: restackio/[email protected]
with:
file: "src-tauri/tauri.conf.json"
fields: "{\"tauri.updater.active\": false}"

- name: Update tauri.conf.json version
uses: jossef/action-set-json-field@v2
with:
file: "src-tauri/tauri.conf.json"
field: "package.version"
value: ${{ steps.latestTag.outputs.tag }}
- name: Write env file
uses: DamianReeves/[email protected]
with:
path: "./.env"
contents: |
DUMMY_ENV=dummy
- name: Write env file
uses: DamianReeves/[email protected]
with:
path: "./.env"
contents: |
DUMMY_ENV=dummy
- name: Build
env:
NODE_OPTIONS: "--max-old-space-size=4096"
run: |
yarn tauri build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Installer
path: src-tauri/target/release/bundle/msi/GlacierKit_${{ steps.latestTag.outputs.tag }}_x64_en-US.msi.zip
- name: Build
env:
NODE_OPTIONS: "--max-old-space-size=4096"
run: |
yarn tauri build
Loading

0 comments on commit e58b265

Please sign in to comment.