mirror of
				https://github.com/yuezk/GlobalProtect-openconnect.git
				synced 2025-05-20 07:26:58 -04:00 
			
		
		
		
	Update build
This commit is contained in:
		
							
								
								
									
										74
									
								
								.github/workflows/build.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										74
									
								
								.github/workflows/build.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -53,7 +53,8 @@ jobs: | ||||
|       run: | | ||||
|         tar -xzf *.tar.gz | ||||
|         cd globalprotect-openconnect-* | ||||
|         make deb | ||||
|  | ||||
|         make deb BUILD_FE=0 | ||||
|     - name: Install DEB package | ||||
|       run: | | ||||
|         cd globalprotect-openconnect-*/ | ||||
| @@ -87,7 +88,8 @@ jobs: | ||||
|       run: | | ||||
|         tar -xzf globalprotect-openconnect-*.tar.gz | ||||
|         cd globalprotect-openconnect-*/ | ||||
|         make rpm | ||||
|  | ||||
|         make rpm BUILD_FE=0 | ||||
|     - name: Install RPM package | ||||
|       run: | | ||||
|         cd globalprotect-openconnect-*/ | ||||
| @@ -106,6 +108,74 @@ jobs: | ||||
|         path: | | ||||
|           globalprotect-openconnect-*/.build/rpm/*.rpm | ||||
|  | ||||
|   pkgbuild: | ||||
|     runs-on: ubuntu-latest | ||||
|     needs: [tarball] | ||||
|     container: | ||||
|       image: yuezk/gpdev:pkgbuild | ||||
|       credentials: | ||||
|         username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||||
|         password: ${{ secrets.DOCKER_HUB_TOKEN }} | ||||
|     steps: | ||||
|     - name: Download tarball | ||||
|       uses: actions/download-artifact@v3 | ||||
|       with: | ||||
|         name: artifact-tarball | ||||
|     - name: Build PKGBUILD package | ||||
|       run: | | ||||
|         tar -xzf globalprotect-openconnect-*.tar.gz | ||||
|         cd globalprotect-openconnect-*/ | ||||
|  | ||||
|         make pkgbuild BUILD_FE=0 | ||||
|     - name: Install PKGBUILD package | ||||
|       run: | | ||||
|         cd globalprotect-openconnect-*/ | ||||
|         sudo pacman -U .build/pkgbuild/*.pkg.tar.zst | ||||
|  | ||||
|         gpclient --version | ||||
|         gpservice --version | ||||
|         gpauth --version | ||||
|         gpgui-helper --version | ||||
|     - name: Upload PKGBUILD package | ||||
|       uses: actions/upload-artifact@v3 | ||||
|       with: | ||||
|         name: artifact-pkgbuild | ||||
|         path: | | ||||
|           globalprotect-openconnect-*/.build/pkgbuild/*.pkg.tar.zst | ||||
|  | ||||
|   binary: | ||||
|     runs-on: ubuntu-latest | ||||
|     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 | ||||
|         with: | ||||
|           token: ${{ secrets.GH_PAT }} | ||||
|           repository: yuezk/GlobalProtect-openconnect | ||||
|           path: gp | ||||
|       - name: Build binary using OFFLINE mode | ||||
|         run: | | ||||
|           cd gp | ||||
|           make binary OFFLINE=1 | ||||
|       - name: Install binary | ||||
|         run: | | ||||
|           cd gp/.build/binary/globalprotect-openconnect_*_$(uname -m) | ||||
|  | ||||
|           sudo make install | ||||
|           gpclient --version | ||||
|           gpservice --version | ||||
|           gpauth --version | ||||
|           gpgui-helper --version | ||||
|       - name: Upload binary | ||||
|         uses: actions/upload-artifact@v3 | ||||
|         with: | ||||
|           name: artifact-binary | ||||
|           path: | | ||||
|             gp/.build/binary/*.bin.tar.gz | ||||
|  | ||||
|   # Include arm64 if ref is a tag | ||||
|   # setup-matrix: | ||||
|   | ||||
							
								
								
									
										11
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								Makefile
									
									
									
									
									
								
							| @@ -1,4 +1,5 @@ | ||||
| OFFLINE ?= 0 | ||||
| BUILD_FE ?= 1 | ||||
| CARGO ?= cargo | ||||
|  | ||||
| VERSION = $(shell $(CARGO) metadata --no-deps --format-version 1 | jq -r '.packages[0].version') | ||||
| @@ -50,7 +51,9 @@ build: build-fe build-rs | ||||
| # Install and build the frontend | ||||
| # If OFFLINE is set to 1, skip it | ||||
| build-fe: | ||||
| 	if [ $(OFFLINE) -eq 0 ]; then \ | ||||
| 	if [ $(OFFLINE) -eq 1 ] || [ $(BUILD_FE) -eq 0 ]; then \ | ||||
| 		echo "Skipping frontend build (OFFLINE=1 or BUILD_FE=0)"; \ | ||||
| 	else \ | ||||
| 		cd apps/gpgui-helper && pnpm install && pnpm build; \ | ||||
| 	fi | ||||
|  | ||||
| @@ -112,7 +115,7 @@ init-debian: clean-debian tarball | ||||
| 	mkdir -p .build/deb | ||||
| 	cp .build/tarball/${PKG}.tar.gz .build/deb | ||||
|  | ||||
| 	tar -xzf .build/deb/${PKG}.tar.gz | ||||
| 	tar -xzf .build/deb/${PKG}.tar.gz -C .build/deb | ||||
| 	cd .build/deb/${PKG} | ||||
|  | ||||
| 	debmake | ||||
| @@ -136,7 +139,7 @@ deb: init-debian | ||||
|  | ||||
| check-ppa: | ||||
| 	if [ $(OFFLINE) -eq 0 ]; then \ | ||||
| 		@echo "Error: ppa build requires offline mode (OFFLINE=1)"; \ | ||||
| 		echo "Error: ppa build requires offline mode (OFFLINE=1)"; \ | ||||
| 	fi | ||||
|  | ||||
| # Usage: make ppa SERIES=focal OFFLINE=1 PUBLISH=1 | ||||
| @@ -155,7 +158,7 @@ ppa: check-ppa init-debian | ||||
| 	if [ $(PUBLISH) -eq 1 ]; then \ | ||||
| 		dput ppa:yuezk/globalprotect-openconnect ../*.changes; \ | ||||
| 	else | ||||
| 		@echo "Skipping ppa publish (PUBLISH=0)" | ||||
| 		echo "Skipping ppa publish (PUBLISH=0)" | ||||
| 	fi | ||||
|  | ||||
| clean-rpm: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user