diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2317731..b1b2727 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -682,33 +682,6 @@ jobs: run: | cd gh-release/gp/scripts && ./gh-release.sh "$RELEASE_TAG" - update-flake-hashes: - if: ${{ startsWith(github.ref, 'refs/tags/') }} - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - needs: - - gh-release - steps: - - name: Checkout GlobalProtect-openconnect - uses: actions/checkout@v6 - with: - token: ${{ secrets.GH_PAT }} - repository: yuezk/GlobalProtect-openconnect - ref: ${{ github.ref }} - - - name: Install Nix - uses: cachix/install-nix-action@v31 - - - name: Update flake hashes - run: scripts/update-flake-hashes.sh "${{ github.ref_name }}" - - - name: Open pull request - env: - GH_TOKEN: ${{ secrets.GH_PAT }} - run: scripts/open-flake-hashes-pr.sh "${{ github.ref_name }}" - publish-docker-image: needs: - build-docker-image diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2fe1e42..0cc33be 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -274,6 +274,13 @@ jobs: uses: actions/download-artifact@v8 with: path: gh-release + - name: Generate release notes + id: release-notes + run: | + cd gh-release/gp + mkdir -p .build + scripts/release-notes.sh "${{ inputs.tag }}" > .build/release-notes.md + echo "path=$GITHUB_WORKSPACE/gh-release/gp/.build/release-notes.md" >> "$GITHUB_OUTPUT" - name: Rename APK artifacts run: | shopt -s nullglob @@ -314,4 +321,5 @@ jobs: prerelease: ${{ contains(github.ref, 'snapshot') }} fail_on_unmatched_files: true tag_name: ${{ inputs.tag }} + body_path: ${{ steps.release-notes.outputs.path }} files: ${{ steps.release-assets.outputs.files }} diff --git a/Cargo.lock b/Cargo.lock index 19c14a1..af662ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -214,7 +214,7 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "auth" -version = "2.6.0" +version = "2.6.1" dependencies = [ "anyhow", "block2", @@ -705,7 +705,7 @@ dependencies = [ [[package]] name = "common" -version = "2.6.0" +version = "2.6.1" [[package]] name = "compile-time" @@ -1732,7 +1732,7 @@ dependencies = [ [[package]] name = "gpapi" -version = "2.6.0" +version = "2.6.1" dependencies = [ "anyhow", "base64 0.22.1", @@ -1776,7 +1776,7 @@ dependencies = [ [[package]] name = "gpauth" -version = "2.6.0" +version = "2.6.1" dependencies = [ "anyhow", "auth", @@ -1796,7 +1796,7 @@ dependencies = [ [[package]] name = "gpclient" -version = "2.6.0" +version = "2.6.1" dependencies = [ "anyhow", "askama", @@ -1825,7 +1825,7 @@ dependencies = [ [[package]] name = "gpgui-helper" -version = "2.6.0" +version = "2.6.1" dependencies = [ "anyhow", "clap", @@ -1843,7 +1843,7 @@ dependencies = [ [[package]] name = "gpservice" -version = "2.6.0" +version = "2.6.1" dependencies = [ "anyhow", "axum", @@ -3191,7 +3191,7 @@ dependencies = [ [[package]] name = "openconnect" -version = "2.6.0" +version = "2.6.1" dependencies = [ "autotools", "cc", diff --git a/Cargo.toml b/Cargo.toml index 6d6ddeb..9525fb2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ members = [ [workspace.package] rust-version = "1.89" -version = "2.6.0" +version = "2.6.1" authors = ["Kevin Yue "] homepage = "https://github.com/yuezk/GlobalProtect-openconnect" edition = "2024" diff --git a/changelog.md b/changelog.md index 9e89130..39c5f89 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,19 @@ # Changelog +## 2.6.1 + +### Changed + +- Improved external browser authentication so `--browser` chooses Chrome first, then Firefox, then the system default browser. +- Improved NixOS prebuilt package integration for launching helper binaries and desktop services. +- Updated the release process to publish GitHub release notes from the changelog. + +### Fixed + +- Fixed NixOS GUI launch failures caused by package-local binary paths. +- Fixed NixOS tray icon setup documentation for GNOME desktops. +- Fixed release automation so Nix flake hash updates are run manually after release assets are available. + ## 2.6.0 ### Added diff --git a/scripts/gh-release.sh b/scripts/gh-release.sh index 9cf1a24..e31c423 100755 --- a/scripts/gh-release.sh +++ b/scripts/gh-release.sh @@ -9,9 +9,6 @@ REPO="yuezk/GlobalProtect-openconnect" TAG=${1:-} SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -PROJECT_DIR="$(dirname "$SCRIPT_DIR")" - -RELEASE_NOTES="Release $TAG" if [ -z "$TAG" ]; then echo "Usage: ./scripts/gh-release.sh " @@ -36,8 +33,6 @@ release_assets() { # For snapshot release, we don't create a release, just clear the existing assets and upload new ones. # This is to avoid notification spam. release_snapshot() { - RELEASE_NOTES='**!!! DO NOT USE THIS RELEASE IN PRODUCTION !!!**' - while IFS= read -r asset; do if [ -n "$asset" ]; then gh -R "$REPO" release delete-asset "$TAG" "$asset" --yes @@ -55,11 +50,15 @@ release_tag() { gh -R "$REPO" release delete "$TAG" --yes --cleanup-tag || true echo "Creating release..." + local release_notes_file + release_notes_file="$(mktemp)" + "$SCRIPT_DIR/release-notes.sh" "$TAG" > "$release_notes_file" + # Upload source tarballs, GUI components, and BSD packages. Other Linux # packages are built in `release.yml` from the standalone source tarball. gh -R "$REPO" release create "$TAG" \ --title "$TAG" \ - --notes "$RELEASE_NOTES" + --notes-file "$release_notes_file" mapfile -t files < <(release_assets) upload_files "${files[@]}" diff --git a/scripts/release-notes.sh b/scripts/release-notes.sh new file mode 100755 index 0000000..bc9a596 --- /dev/null +++ b/scripts/release-notes.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +set -euo pipefail + +tag="${1:-}" + +if [[ -z "$tag" ]]; then + echo "Usage: $0 " >&2 + exit 1 +fi + +version="${tag#v}" + +awk -v version="$version" ' + $0 == "## " version { + found = 1 + next + } + found && /^## / { + exit + } + found { + print + } + END { + if (!found) { + exit 1 + } + } +' changelog.md