From d1ec358b8aa65feb32de1f68ba1922e6d0758d8a Mon Sep 17 00:00:00 2001 From: Kevin Yue Date: Sun, 25 Feb 2024 18:34:52 +0800 Subject: [PATCH] Update build --- .github/workflows/build.yaml | 15 ++++++++------- Makefile | 8 ++++++-- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 365c2a2..104ba5a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -130,7 +130,7 @@ jobs: - name: Install PKGBUILD package run: | cd globalprotect-openconnect-*/ - sudo pacman -U .build/pkgbuild/*.pkg.tar.zst + sudo pacman -U --noconfirm .build/pkgbuild/*.pkg.tar.zst gpclient --version gpservice --version @@ -145,21 +145,22 @@ jobs: binary: runs-on: ubuntu-latest + needs: [tarball] container: image: yuezk/gpdev:main credentials: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_TOKEN }} steps: - - name: Checkout GlobalProtect-openconnect - uses: actions/checkout@v3 + - name: Download tarball + uses: actions/download-artifact@v3 with: - token: ${{ secrets.GH_PAT }} - repository: yuezk/GlobalProtect-openconnect - path: gp + name: artifact-tarball - name: Build binary using OFFLINE mode run: | - cd gp + tar -xzf globalprotect-openconnect-*.tar.gz + cd globalprotect-openconnect-*/ + make binary OFFLINE=1 - name: Install binary run: | diff --git a/Makefile b/Makefile index e6d3dd0..1ec2480 100644 --- a/Makefile +++ b/Makefile @@ -63,6 +63,8 @@ build-fe: fi build-rs: + printenv + if [ $(OFFLINE) -eq 1 ]; then \ tar -xJf vendor.tar.xz; \ fi @@ -135,7 +137,9 @@ deb: init-debian dch --create --distribution unstable --package $(PKG_NAME) --newversion $(VERSION)-$(REVISION) "Bugfix and improvements." - debuild --preserve-env -e PATH -us -uc -b + printenv + + debuild -e PATH -us -uc -b check-ppa: if [ $(OFFLINE) -eq 0 ]; then \ @@ -183,7 +187,7 @@ rpm: init-rpm tarball rm -rf $(HOME)/rpmbuild rpmdev-setuptree - cp .build/tarball/${PKG}.tar.gz $(HOME)/rpmbuild/SOURCES + cp .build/tarball/${PKG}.tar.gz $(HOME)/rpmbuild/SOURCES/${PKG_NAME}.tar.gz rpmbuild -ba .build/rpm/globalprotect-openconnect.spec # Copy RPM package from build directory