From 269a5d4701526d4c22f180890b4dec0485f6d5f3 Mon Sep 17 00:00:00 2001 From: leone Date: Tue, 30 Jan 2024 20:54:29 +0100 Subject: [PATCH] release: stable 0.1.0 (#4) * release: stable 0.1.0 --- .github/workflows/draft_stable.yml | 44 ++++++++++++++++++++------ CHANGELOG.md | 2 +- snap/snapcraft.yaml | 51 +++++++++++++++++++----------- 3 files changed, 68 insertions(+), 29 deletions(-) diff --git a/.github/workflows/draft_stable.yml b/.github/workflows/draft_stable.yml index be65f1c..0f60fdf 100644 --- a/.github/workflows/draft_stable.yml +++ b/.github/workflows/draft_stable.yml @@ -27,9 +27,33 @@ jobs: - name: Print Info run: | echo $GITHUB_REF - echo $BRANCH_NAME 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 @@ -46,7 +70,7 @@ jobs: continue-on-error: true run: gh release view $VERSION-$CHANNEL env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.CI_TOKEN }} - name: Create draft release if: steps.release-exists.outcome == 'failure' && steps.release-exists.conclusion == 'success' run: | @@ -54,24 +78,24 @@ jobs: $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 + ./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.GITHUB_TOKEN }} + 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_amd64.deb || true + /wireguard-gui_${VERSION}_amd64.deb || true gh release delete-asset -y \ $VERSION-$CHANNEL \ - wireguard-gui_amd64.AppImage|| true + wireguard-gui_${VERSION}_amd64.AppImage|| true gh release upload \ $VERSION-$CHANNEL \ - ./src-tauri/target/release/bundle/deb/wireguard-gui_$VERSION_amd64.deb#wireguard-gui_amd64.deb + ./src-tauri/target/release/bundle/deb/wireguard-gui_${VERSION}_amd64.deb#wireguard-gui_amd64.deb gh release upload \ $VERSION-$CHANNEL \ - ./src-tauri/target/release/bundle/appimage/wireguard-gui_$VERSION_amd64.AppImage#wireguard-gui_amd64.AppImage + ./src-tauri/target/release/bundle/appimage/wireguard-gui_${VERSION}_amd64.AppImage#wireguard-gui_amd64.AppImage env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.CI_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index d0ec863..2c6a026 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ 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.0] +## [0.1.0] - 2024-01-30 ### Added diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index d64be97..64d1498 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,29 +1,44 @@ name: wireguard-gui # you probably want to 'snapcraft register ' base: core22 # the base snap is the execution environment for this snap -version: '0.1' # just for humans, typically '1.2+git' or '1.3.2' -summary: Wireguard client gui made with nextauri +version: '0.1.0' # just for humans, typically '1.2+git' or '1.3.2' +summary: Wireguard client GUI made with nextauri description: | - Provide a Wireguard client gui for easy profile management -grade: devel # must be 'stable' to release into candidate/stable channels -confinement: devmode # use 'strict' once you have the right plugs and slots + Provide a Wireguard client GUI for easy profile management +grade: stable # must be 'stable' to release into candidate/stable channels +confinement: strict # use 'strict' once you have the right plugs and slots apps: wireguard-gui: - extensions: [gnome] - command: usr/bin/wireguard-gui - desktop: usr/share/applications/com.wireguard-gui.gg + # extensions: [gnome] + command: desktop-launch $SNAP/usr/bin/wireguard-gui + desktop: usr/share/applications/wireguard-gui.desktop common-id: com.wireguard-gui.gg + # environment: + # LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib plugs: - - gsettings - - cups - -slots: - gnome-text-editor: - interface: dbus - bus: session - name: com.wireguard-gui + - home # Access to user's home directory + - network # This plug grants network access + - network-bind # This plug is often needed for applications that listen on ports + - desktop # This plug grants access to the desktop environment + - desktop-legacy # This plug grants access to legacy desktop environments + - wayland # This plug grants access to Wayland + - x11 # This plug grants access to X11 parts: - my-part: - # See 'snapcraft plugins' + # Install wireguard and zenity from apt + dependencies: + plugin: nil + stage-packages: + - wireguard + - zenity + - pkexec + + # Install wireguard-gui from github + wireguard-gui: plugin: nil + override-build: | + wget https://github.com/leon3s/wireguard-gui/releases/download/0.1.0-stable/wireguard-gui_0.1.0_amd64.deb + dpkg -x wireguard-gui_0.1.0_amd64.deb $SNAPCRAFT_PART_INSTALL/ + build-packages: + - dpkg + - wget