Skip to content

Commit

Permalink
Add missing Tauri pieces (#347)
Browse files Browse the repository at this point in the history
  • Loading branch information
icidasset authored Aug 8, 2022
1 parent 93646c2 commit cda819e
Show file tree
Hide file tree
Showing 14 changed files with 920 additions and 1,409 deletions.
50 changes: 26 additions & 24 deletions .github/workflows/native-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

# Nix
- uses: cachix/install-nix-action@v13
- uses: cachix/install-nix-action@v16
with:
nix_path: nixpkgs=channel:nixos-unstable

Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
TAG_NAME: ${{ steps.package-version.outputs.current-version }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: mkdir compressed

# Download artifacts
Expand All @@ -82,7 +82,7 @@ jobs:
uses: martinbeentjes/[email protected]

# Create release
- uses: softprops/action-gh-release@v0.1.7
- uses: softprops/action-gh-release@v1
id: create_release
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -91,7 +91,6 @@ jobs:
name: "v${{ steps.package-version.outputs.current-version }}"
body: "See the assets to download this version and install."
draft: true
prerelease: true

files: |
compressed/diffuse-web.zip
Expand All @@ -112,51 +111,54 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# OS
- name: install linux dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update && sudo apt install libwebkit2gtk-4.0-dev \
build-essential \
curl \
wget \
libssl-dev \
libgtk-3-dev \
libgtksourceview-3.0-dev \
squashfs-tools
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
# Rust
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
with:
working-directory: src-tauri
workspaces: "src-tauri -> target"

# Download artifacts
- uses: actions/download-artifact@v2
with:
name: build
path: build/

# Install Tauri CLI
- run: just install-tauri-cli

# Make a build
- run: cargo build --no-default-features # --release
working-directory: src-tauri
- run: just tauri-build
if: matrix.os != 'macos-latest'

# Upload artifacts (MacOS)
- uses: softprops/[email protected]
- run: just tauri-build-universal
if: matrix.os == 'macos-latest'

# Upload artifacts
- uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

tag_name: "${{ needs.create-release.outputs.TAG_NAME }}"
draft: true
prerelease: true

files: |
src-tauri/target/debug/bundle/appimage/*.AppImage
src-tauri/target/debug/bundle/deb/*.deb
src-tauri/target/debug/bundle/dmg/*.dmg
src-tauri/target/debug/bundle/macos/*.app
src-tauri/target/release/bundle/appimage/*.AppImage
src-tauri/target/release/bundle/deb/*.deb
src-tauri/target/release/bundle/dmg/*.dmg
src-tauri/target/release/bundle/msi/*.msi
src-tauri/target/universal-apple-darwin/release/bundle/dmg/*.dmg
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 3.2.0

Native builds with [Tauri](https://tauri.app/).


## 3.1.1

Fixes Google Drive CORS issue.
Expand Down
12 changes: 10 additions & 2 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,13 @@ js-prod: vendor-js

@tauri-build:
echo "> Building Tauri binaries"
./src-tauri/bin/cargo-tauri tauri build # --target universal-apple-darwin
./src-tauri/bin/cargo-tauri tauri build --config ./src-tauri/tauri.conf.json


@tauri-build-universal:
echo "> Building Tauri binaries (Universal MacOS build)"
rustup target add aarch64-apple-darwin
./src-tauri/bin/cargo-tauri tauri build --target universal-apple-darwin --config ./src-tauri/tauri.conf.json


@vendor-js:
Expand Down Expand Up @@ -200,7 +206,9 @@ js-prod: vendor-js
just download-vendor-dep pep.js https://raw.githubusercontent.com/mpizenberg/elm-pep/071616d75ca61e261fdefc7b55bc46c34e44ea22/elm-pep.js
just download-vendor-dep ipfs.min.js https://unpkg.com/ipfs@0.62.3/index.min.js

cargo install tauri-cli --version "^1.0.0-rc.6" --root ./src-tauri

@install-tauri-cli:
cargo install tauri-cli --version "^1.0.5" --root ./src-tauri


@quality: check-versions
Expand Down
2 changes: 1 addition & 1 deletion elm.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"elm-community/list-extra": "8.5.2",
"elm-community/maybe-extra": "5.3.0",
"elm-explorations/markdown": "1.0.0",
"fission-suite/webnative-elm": "7.0.0",
"fission-codes/webnative-elm": "1.0.0",
"icidasset/elm-binary": "2.1.0",
"icidasset/elm-material-icons": "9.0.0",
"icidasset/elm-sha": "2.0.2",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Diffuse",
"description": "A music player that connects to your cloud/distributed storage",
"version": "3.1.1",
"version": "3.2.0",
"author": "Steven Vandevelde <[email protected]>",
"homepage": "https://diffuse.sh",
"repository": "github:icidasset/diffuse",
Expand Down
Loading

0 comments on commit cda819e

Please sign in to comment.