forked from leon3s/wireguard-gui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'leon3s:master' into master
- Loading branch information
Showing
11 changed files
with
751 additions
and
513 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
Oops, something went wrong.