Skip to content

fix: added libwebkit in dependencies and enabled verbose in arm build #2

fix: added libwebkit in dependencies and enabled verbose in arm build

fix: added libwebkit in dependencies and enabled verbose in arm build #2

name: Draft stable arm
on:
push:
branches:
- 'release/stable/**'
pull_request:
branches:
- 'release/stable/**'
types: [opened, synchronize]
env:
CARGO_TERM_COLOR: always
jobs:
draft_stable:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Extract branch info
- name: Set info
run: |
echo "CHANNEL=$(echo ${GITHUB_REF} | awk -F/ '{print $4}')" >> $GITHUB_ENV
echo "VERSION=$(echo ${GITHUB_REF} | awk -F/ '{print $5}')" >> $GITHUB_ENV
# Print info for debug
- name: Print Info
run: |
echo $GITHUB_REF
echo $CHANNEL
echo $VERSION
# Cache Rust
- uses: actions/cache@v3
with:
path: ./src-tauri/target
key: ${{ hashFiles('./src-tauri/Cargo.lock') }}
# Cache Rust
- uses: actions/cache@v3
with:
path: ~/.cargo
key: ${{ hashFiles('./src-tauri/Cargo.lock') }}
# Cache Node
- uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ hashFiles('./package-lock.json') }}
# Cache Next.js
- uses: actions/cache@v3
with:
path: ./src-next/.next
key: ${{ hashFiles('./src-next/package-lock.json') }}
- uses: pguyot/[email protected]
with:
base_image: https://dietpi.com/downloads/images/DietPi_RPi-ARMv8-Bullseye.img.xz
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-get update -y --allow-releaseinfo-change
apt-get upgrade -y
apt-get autoremove -y
apt-get install curl
curl https://sh.rustup.rs -sSf | sh -s -- -y
. "$HOME/.cargo/env"
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash
# Install framework specific packages
apt-get install -y nodejs
npm install next@latest react@latest react-dom@latest eslint-config-next@latest
# Install build tools and tauri-cli requirements
apt-get install -y libwebkit2gtk-4.0-dev build-essential wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
# cargo install tauri-cli
# Install frontend dependencies
npm install
# Build the application
npm run tauri build -- --verbose
- name: Test if release already exists
id: release-exists
continue-on-error: true
run: gh release view $VERSION-$CHANNEL
env:
GITHUB_TOKEN: ${{ secrets.CI_TOKEN }}
- name: Create draft release
if: steps.release-exists.outcome == 'failure' && steps.release-exists.conclusion == 'success'
run: |
gh release create -d \
$VERSION-$CHANNEL \
-t -$VERSION-$CHANNEL \
-F ./CHANGELOG.md \
./src-tauri/target/release/bundle/deb/wireguard-gui_${VERSION}_arm64.deb#wireguard-gui_arm64.deb \
./src-tauri/target/release/bundle/appimage/wireguard-gui_${VERSION}_arm64.AppImage#wireguard-gui_arm64.AppImage
env:
GITHUB_TOKEN: ${{ secrets.CI_TOKEN }}
- name: Update draft release
if: steps.release-exists.outcome == 'success' && steps.release-exists.conclusion == 'success'
run: |
gh release delete-asset -y \
$VERSION-$CHANNEL \
/wireguard-gui_${VERSION}_arm64.deb || true
gh release delete-asset -y \
$VERSION-$CHANNEL \
wireguard-gui_${VERSION}_arm64.AppImage|| true
gh release upload \
$VERSION-$CHANNEL \
./src-tauri/target/release/bundle/deb/wireguard-gui_${VERSION}_arm64.deb#wireguard-gui_arm64.deb
gh release upload \
$VERSION-$CHANNEL \
./src-tauri/target/release/bundle/appimage/wireguard-gui_${VERSION}_arm64.AppImage#wireguard-gui_arm64.AppImage
env:
GITHUB_TOKEN: ${{ secrets.CI_TOKEN }}