Skip to content

Commit

Permalink
bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
iambenzo committed Nov 21, 2024
1 parent c4a8cbd commit a6a81a2
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 1 deletion.
99 changes: 99 additions & 0 deletions .github/workflows/bundle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Build Artifacts

on:
workflow_dispatch:

env:
VERSION: 0.1.0

jobs:
release:
permissions: write-all
strategy:
fail-fast: false
matrix:
platform:
[macos-latest, macos-13, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install -y build-essential gcc libxcb-composite0-dev libgtk-3-dev
# run: |
# sudo apt-get update
# sudo apt-get install -y build-essential curl libssl-dev

- name: Rust setup
uses: dtolnay/rust-toolchain@stable

- name: Rust cache
uses: swatinem/rust-cache@v2

- name: Install app dependencies
run: cargo install cargo-packager --locked

- name: Package Binary
run: cargo packager --release --verbose

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform }}-release-artifacts
path: |
${{ matrix.platform == 'macos-latest' && 'target/release/ktr.app' || '' }}
${{ matrix.platform == 'macos-latest' && 'target/release/ktr_*_aarch64.dmg' || '' }}
${{ matrix.platform == 'macos-latest' && 'target/release/ktr' || '' }}
${{ matrix.platform == 'macos-13' && 'target/release/ktr.app' || '' }}
${{ matrix.platform == 'macos-13' && 'target/release/ktr_*_x64.dmg' || '' }}
${{ matrix.platform == 'macos-13' && 'target/release/ktr' || '' }}
${{ matrix.platform == 'ubuntu-latest' && 'target/release/PKGBUILD' || '' }}
${{ matrix.platform == 'ubuntu-latest' && 'target/release/ktr_*_amd64.deb' || '' }}
${{ matrix.platform == 'ubuntu-latest' && 'target/release/ktr_*_x86_64.AppImage' || '' }}
${{ matrix.platform == 'ubuntu-latest' && 'target/release/ktr' || '' }}
${{ matrix.platform == 'windows-latest' && 'target/release/ktr_*_x64_en-US.msi' || '' }}
${{ matrix.platform == 'windows-latest' && 'target/release/ktr_*_x64-setup.exe' || '' }}
${{ matrix.platform == 'windows-latest' && 'target/release/ktr.exe' || '' }}
# Upload to GitHub release job
# upload_to_release:
# permissions: write-all
# runs-on: ubuntu-latest
# needs: [release]
# steps:
# - name: Download release artifacts
# uses: actions/download-artifact@v4
# with:
# path: artifacts
# merge-multiple: true
#
# - name: Create attestation for all builds
# uses: actions/attest-build-provenance@v1
# with:
# subject-path: |
# artifacts/PKGBUILD
# artifacts/ktr_*_aarch64.dmg
# artifacts/ktr_*_x64.dmg
# artifacts/ktr_*_amd64.deb
# artifacts/ktr_*_x86_64.AppImage
# artifacts/ktr_*_x64_en-US.msi
# artifacts/ktr_*_x64-setup.exe
# - name: Release to GitHub
# uses: softprops/action-gh-release@v2
# with:
# draft: true
# generate_release_notes: true
# tag_name: ktr v${{ env.VERSION }}
# files: |
# artifacts/PKGBUILD
# artifacts/ktr_*_aarch64.dmg
# artifacts/ktr_*_x64.dmg
# artifacts/ktr_*_amd64.deb
# artifacts/ktr_*_x86_64.AppImage
# artifacts/ktr_*_x64_en-US.msi
# artifacts/ktr_*_x64-setup.exe
# artifacts/ktr_*_arm64.deb
# artifacts/ktr_*_riscv64.deb
#
12 changes: 11 additions & 1 deletion gui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,14 @@ publish = false
iced = {version="0.13.1", features = ["tokio", "advanced"]}
kindle_clippings = { path = "../kindle_clippings"}
rfd = "0.15.0"
# tokio = { version = "1.41.1", features = ["rt"] }

[package.metadata.packager]
product-name = "ktr"
publisher = "iambenzo"
authors = ["Ben Burbage"]
description = "Converts Kindle highlights to a reference format for use in a Zettelkasten"
identifier = "com.iambenzo.ktr"
category = "Utility"
homepage = "https://iambenzo.com"
icons = ["assets/logo.png"]
before-packaging-command = "cargo build --release"
Binary file added gui/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a6a81a2

Please sign in to comment.