Skip to content

Commit

Permalink
Create prerelease-latest workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Roth <developer@freakydu.de>
  • Loading branch information
freakydude committed Nov 12, 2023
1 parent 988b091 commit 267b33b
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/output-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: 'output-test'

on: [push]
on:
workflow_dispatch:

jobs:
job1:
Expand Down
89 changes: 89 additions & 0 deletions .github/workflows/prerelease-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: 'prerelease-latest'
on: [push]

env:
tagName: prerelease-latest
releaseName: prerelease-latest
preRelease: true
jobs:
release-amd64-multiplatform:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]

runs-on: ${{ matrix.platform }}
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: install rust
uses: dtolnay/rust-toolchain@stable
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
- name: install frontend dependencies
run: |
npm install
- name: build and upload release
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: ${{ env.tagName }} # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: ${{ env.releaseName }}
releaseBody: All installer packages from latest commit made.
releaseDraft: false
prerelease: ${{ env.preRelease }}

release-rpi_armv8_bullseye:
# needs: [release-amd64-multiplatform]
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: build release
uses: pguyot/arm-runner-action@v2
with:
base_image: dietpi:rpi_armv8_bullseye #https://dietpi.com/downloads/images/DietPi_RPi-ARMv8-Bullseye.7z
cpu: cortex-a53
bind_mount_repository: true
image_additional_mb: 10240
optimize_image: false
commands: |
# Rust complains (rightly) that $HOME doesn't match eid home
export HOME=/root
# Workaround to CI worker being stuck on Updating crates.io index
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
# Install setup prerequisites
apt update -y
apt install -y ca-certificates curl gnupg
mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
apt update -y
apt install -y nodejs libwebkit2gtk-4.0-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
curl https://sh.rustup.rs -sSf | sh -s -- -y
. "$HOME/.cargo/env"
npm install
npm install --save-dev @tauri-apps/cli
npm run tauri build
pwd
- name: upload release
uses: softprops/action-gh-release@v1
with:
name: ${{ env.releaseName }}
tag_name: ${{ env.tagName }}
prerelease: ${{ env.preRelease }}
generate_release_notes: true
files: |
${{ github.workspace }}/src-tauri/target/release/bundle/deb/*.deb
6 changes: 4 additions & 2 deletions src/routes/files/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@
});
let fileMetaResponse = await client.sendRequest(fileMetaRequest);
fileMeta = fileMetaResponse.result;
if (fileMetaResponse.result !== undefined) {
fileMeta = fileMetaResponse.result as IFileMetadata;
}
// get thumbnail with largest width
if (Array.isArray(fileMeta.thumbnails) && fileMeta.thumbnails.length > 0) {
if (fileMeta !== undefined && Array.isArray(fileMeta.thumbnails) && fileMeta.thumbnails.length > 0) {
thumbnail = fileMeta.thumbnails.sort((n1, n2) => n1.width - n2.width)[0];
}
Expand Down

0 comments on commit 267b33b

Please sign in to comment.