mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-04-29 22:26:26 -04:00
Compare commits
4 Commits
18d4e1ea28
...
c3d7a9fee4
Author | SHA1 | Date | |
---|---|---|---|
|
c3d7a9fee4 | ||
|
0a26d6e360 | ||
|
3617dd990b | ||
|
5d9c7b1cc8 |
86
.github/workflows/build.yaml
vendored
86
.github/workflows/build.yaml
vendored
@ -13,8 +13,24 @@ on:
|
|||||||
- latest
|
- latest
|
||||||
- v*.*.*
|
- v*.*.*
|
||||||
jobs:
|
jobs:
|
||||||
|
# Include arm64 if ref is a tag
|
||||||
|
setup-matrix:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||||
|
steps:
|
||||||
|
- name: Set up matrix
|
||||||
|
id: set-matrix
|
||||||
|
run: |
|
||||||
|
if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
|
||||||
|
echo "matrix=[\"ubuntu-latest\", \"arm64\"]" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "matrix=[\"ubuntu-latest\"]" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
tarball:
|
tarball:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: [setup-matrix]
|
||||||
steps:
|
steps:
|
||||||
- uses: pnpm/action-setup@v2
|
- uses: pnpm/action-setup@v2
|
||||||
with:
|
with:
|
||||||
@ -38,8 +54,13 @@ jobs:
|
|||||||
gp/.build/tarball/*.tar.gz
|
gp/.build/tarball/*.tar.gz
|
||||||
|
|
||||||
build-deb:
|
build-deb:
|
||||||
runs-on: ubuntu-latest
|
needs:
|
||||||
needs: [tarball]
|
- setup-matrix
|
||||||
|
- tarball
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: ${{fromJson(needs.setup-matrix.outputs.matrix)}}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
container:
|
container:
|
||||||
image: yuezk/gpdev:main
|
image: yuezk/gpdev:main
|
||||||
credentials:
|
credentials:
|
||||||
@ -68,14 +89,19 @@ jobs:
|
|||||||
- name: Upload DEB package
|
- name: Upload DEB package
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: artifact-deb
|
name: artifact-deb-${{ matrix.os }}
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
path: |
|
path: |
|
||||||
globalprotect-openconnect-*/.build/deb/*.deb
|
globalprotect-openconnect-*/.build/deb/*.deb
|
||||||
|
|
||||||
build-rpm:
|
build-rpm:
|
||||||
runs-on: ubuntu-latest
|
needs:
|
||||||
needs: [tarball]
|
- setup-matrix
|
||||||
|
- tarball
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: ${{fromJson(needs.setup-matrix.outputs.matrix)}}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
container:
|
container:
|
||||||
image: yuezk/gpdev:rpm-builder
|
image: yuezk/gpdev:rpm-builder
|
||||||
credentials:
|
credentials:
|
||||||
@ -106,14 +132,19 @@ jobs:
|
|||||||
- name: Upload RPM package
|
- name: Upload RPM package
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: artifact-rpm
|
name: artifact-rpm-${{ matrix.os }}
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
path: |
|
path: |
|
||||||
globalprotect-openconnect-*/.build/rpm/*.rpm
|
globalprotect-openconnect-*/.build/rpm/*.rpm
|
||||||
|
|
||||||
build-pkgbuild:
|
build-pkgbuild:
|
||||||
runs-on: ubuntu-latest
|
needs:
|
||||||
needs: [tarball]
|
- setup-matrix
|
||||||
|
- tarball
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: ${{fromJson(needs.setup-matrix.outputs.matrix)}}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
container:
|
container:
|
||||||
image: yuezk/gpdev:pkgbuild
|
image: yuezk/gpdev:pkgbuild
|
||||||
credentials:
|
credentials:
|
||||||
@ -142,14 +173,19 @@ jobs:
|
|||||||
- name: Upload PKGBUILD package
|
- name: Upload PKGBUILD package
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: artifact-pkgbuild
|
name: artifact-pkgbuild-${{ matrix.os }}
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
path: |
|
path: |
|
||||||
globalprotect-openconnect-*/.build/pkgbuild/*.pkg.tar.zst
|
globalprotect-openconnect-*/.build/pkgbuild/*.pkg.tar.zst
|
||||||
|
|
||||||
build-binary:
|
build-binary:
|
||||||
runs-on: ubuntu-latest
|
needs:
|
||||||
needs: [tarball]
|
- setup-matrix
|
||||||
|
- tarball
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: ${{fromJson(needs.setup-matrix.outputs.matrix)}}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
container:
|
container:
|
||||||
image: yuezk/gpdev:main
|
image: yuezk/gpdev:main
|
||||||
credentials:
|
credentials:
|
||||||
@ -179,13 +215,18 @@ jobs:
|
|||||||
- name: Upload binary
|
- name: Upload binary
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: artifact-binary
|
name: artifact-binary-${{ matrix.os }}
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
path: |
|
path: |
|
||||||
globalprotect-openconnect-*/.build/binary/*.bin.tar.xz*
|
globalprotect-openconnect-*/.build/binary/*.bin.tar.xz*
|
||||||
|
|
||||||
build-gpgui:
|
build-gpgui:
|
||||||
runs-on: ubuntu-latest
|
needs:
|
||||||
|
- setup-matrix
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: ${{fromJson(needs.setup-matrix.outputs.matrix)}}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
container:
|
container:
|
||||||
image: yuezk/gpdev:main
|
image: yuezk/gpdev:main
|
||||||
credentials:
|
credentials:
|
||||||
@ -216,13 +257,13 @@ jobs:
|
|||||||
- name: Upload gpgui
|
- name: Upload gpgui
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: artifact-gpgui
|
name: artifact-gpgui-${{ matrix.os }}
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
path: |
|
path: |
|
||||||
gpgui/.build/package/*.tar.xz*
|
gpgui/.build/package/*.tar.xz*
|
||||||
|
|
||||||
gh-release:
|
gh-release:
|
||||||
# if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- build-deb
|
- build-deb
|
||||||
@ -241,13 +282,12 @@ jobs:
|
|||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GH_PAT }}
|
token: ${{ secrets.GH_PAT }}
|
||||||
# prerelease: ${{ contains(github.ref, 'latest') }}
|
prerelease: ${{ contains(github.ref, 'latest') }}
|
||||||
prerelease: true
|
|
||||||
fail_on_unmatched_files: true
|
fail_on_unmatched_files: true
|
||||||
files: |
|
files: |
|
||||||
artifact/**/*.deb
|
artifact/artifact-*/globalprotect-openconnect-*/.build/deb/*.deb
|
||||||
artifact/**/*.rpm
|
artifact/artifact-*/globalprotect-openconnect-*/.build/rpm/*.rpm
|
||||||
artifact/**/*.pkg.tar.zst
|
artifact/artifact-*/globalprotect-openconnect-*/.build/pkgbuild/*.pkg.tar.zst
|
||||||
artifact/**/*.bin.tar.xz
|
artifact/artifact-*/globalprotect-openconnect-*/.build/binary/*.bin.tar.xz*
|
||||||
artifact/**/*.tar.gz
|
artifact/artifact-*/*.bin.tar.xz*
|
||||||
artifact/**/*.sha256
|
artifact/artifact-*/*.tar.gz
|
||||||
|
@ -80,14 +80,19 @@ impl GuiUpdater {
|
|||||||
pub async fn update(&self) {
|
pub async fn update(&self) {
|
||||||
info!("Update GUI, version: {}", self.version);
|
info!("Update GUI, version: {}", self.version);
|
||||||
|
|
||||||
|
#[cfg(debug_assertions)]
|
||||||
|
let release_tag = "latest";
|
||||||
|
#[cfg(not(debug_assertions))]
|
||||||
|
let release_tag = format!("v{}", self.version);
|
||||||
|
|
||||||
#[cfg(target_arch = "x86_64")]
|
#[cfg(target_arch = "x86_64")]
|
||||||
let arch = "x86_64";
|
let arch = "x86_64";
|
||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
let arch = "aarch64";
|
let arch = "aarch64";
|
||||||
|
|
||||||
let file_url = format!(
|
let file_url = format!(
|
||||||
"https://github.com/yuezk/GlobalProtect-openconnect/releases/download/v{}/gpgui_{}_{}.bin.tar.xz",
|
"https://github.com/yuezk/GlobalProtect-openconnect/releases/download/{}/gpgui_{}_{}.bin.tar.xz",
|
||||||
self.version, self.version, arch
|
release_tag, self.version, arch
|
||||||
);
|
);
|
||||||
let checksum_url = format!("{}.sha256", file_url);
|
let checksum_url = format!("{}.sha256", file_url);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user