Skip to content

Commit

Permalink
Merge branch 'leon3s:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ittps-pro authored Nov 9, 2024
2 parents 320ee6e + a6f9b6d commit e7b4f61
Show file tree
Hide file tree
Showing 11 changed files with 751 additions and 513 deletions.
98 changes: 98 additions & 0 deletions .github/workflows/draft_stable_ubuntu24.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Draft stable

on:
push:
branches:
- 'release/stable/**'
pull_request:
branches:
- 'release/stable/**'
types: [opened, synchronize]

env:
CARGO_TERM_COLOR: always

jobs:
draft_stable:
runs-on: ubuntu-24.04

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') }}

- name: Install Tauri dependencies
run: |
sudo apt-get update
sudo apt install libdbus-1-dev libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
- name: Install node dependencies
run: npm install

- name: Build application
run: npm run tauri build

- 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}_amd64.deb#wireguard-gui_amd64.deb \
./src-tauri/target/release/bundle/appimage/wireguard-gui_${VERSION}_amd64.AppImage#wireguard-gui_amd64.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}_amd64.deb || true
gh release delete-asset -y \
$VERSION-$CHANNEL \
wireguard-gui_${VERSION}_amd64.AppImage|| true
gh release upload \
$VERSION-$CHANNEL \
./src-tauri/target/release/bundle/deb/wireguard-gui_${VERSION}_amd64.deb#wireguard-gui_ubuntu_24_amd64.deb
env:
GITHUB_TOKEN: ${{ secrets.CI_TOKEN }}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.6] - 2024-10-14

### Added

- Sort profiles by name case insensitive
- deb ubuntu 24.04 support

## [0.1.5] - 2024-09-05

### Added
Expand Down
3 changes: 2 additions & 1 deletion components/profile-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ export function ProfileTable({ current, onConnect }: ProfileTableProps) {
// sort by name
let sortedData = data;
if (debounceFilter) {
sortedData = (data || []).filter((p) => p.name.includes(debounceFilter));
sortedData = (data || []).filter((p) => p.name.toLowerCase()
.includes(debounceFilter.toLowerCase()));
} else {
sortedData = (data || []).sort((a: any, b: any) =>
a.name.localeCompare(b.name),
Expand Down
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
12 changes: 0 additions & 12 deletions next.config.js

This file was deleted.

21 changes: 21 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const isProd = process.env.NODE_ENV === 'production';

const internalHost = process.env.TAURI_DEV_HOST || 'localhost';

/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: false,
swcMinify: true,
// Ensure Next.js uses SSG instead of SSR
// https://nextjs.org/docs/pages/building-your-application/deploying/static-exports
output: 'export',
// Note: This feature is required to use the Next.js Image component in SSG mode.
// See https://nextjs.org/docs/messages/export-image-api for different workarounds.
images: {
unoptimized: true,
},
// Configure assetPrefix or else the server won't properly resolve your assets.
assetPrefix: isProd ? undefined : `http://${internalHost}:3000`,
};

export default nextConfig;
Loading

0 comments on commit e7b4f61

Please sign in to comment.