mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-17 13:46:27 -05:00
feat: add Publish PPA workflow and support for disabling Rust toolchain
This commit is contained in:
3 files changed
+24
-17
No files matched your search
@@ -1,4 +1,4 @@
|
||||
name: Publish Packages
|
||||
name: Publish PPA
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -8,24 +8,18 @@ on:
|
||||
required: true
|
||||
revision:
|
||||
description: 'Package revision'
|
||||
required: true
|
||||
required: false
|
||||
default: "1"
|
||||
ppa:
|
||||
description: 'Publish to PPA'
|
||||
type: boolean
|
||||
series:
|
||||
description: 'Ubuntu series to publish'
|
||||
type: "string"
|
||||
required: false
|
||||
default: ""
|
||||
rust:
|
||||
description: 'Rust version to use'
|
||||
type: "string"
|
||||
required: true
|
||||
default: true
|
||||
obs:
|
||||
description: 'Publish to OBS'
|
||||
type: boolean
|
||||
required: true
|
||||
default: true
|
||||
aur:
|
||||
description: 'Publish to AUR'
|
||||
type: boolean
|
||||
required: true
|
||||
default: true
|
||||
|
||||
default: "1.82"
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -84,6 +78,11 @@ jobs:
|
||||
sed -i "s/@OFFLINE@/1/g" .build/debian/rules
|
||||
sed -i "s/@BUILD_GUI@/1/g" .build/debian/rules
|
||||
|
||||
# Update the control file with the correct Rust version
|
||||
sed -i "s/rust-[0-9.]\+-all/rust-${{ inputs.rust }}-all/g" .build/debian/control
|
||||
sed -i "s/rust-[0-9.]\+/rust-${{ inputs.rust }}/g" .build/debian/rules
|
||||
sed -i "s/DISABLE_RUST_TOOLCHAIN = 0/DISABLE_RUST_TOOLCHAIN = 1/g" .build/debian/rules
|
||||
|
||||
- name: Publish to PPA
|
||||
uses: yuezk/publish-ppa-package@gp
|
||||
with:
|
||||
@@ -97,4 +96,5 @@ jobs:
|
||||
extra_ppa: "yuezk/globalprotect-openconnect"
|
||||
# Ubuntu 18.04 and 20.04 are excluded because tauri2 no longer supports them
|
||||
excluded_series: "bionic focal"
|
||||
series: ${{ inputs.series }}
|
||||
revision: ${{ inputs.revision }}
|
||||
@@ -4,6 +4,7 @@ OFFLINE ?= 0
|
||||
BUILD_FE ?= 1
|
||||
INCLUDE_GUI ?= 0
|
||||
CARGO ?= cargo
|
||||
DISABLE_RUST_TOOLCHAIN ?= 0
|
||||
|
||||
VERSION = $(shell $(CARGO) metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
|
||||
REVISION ?= 1
|
||||
@@ -101,6 +102,11 @@ build-rs:
|
||||
tar -xJf vendor.tar.xz; \
|
||||
fi
|
||||
|
||||
# Remove the rust-toolchain.toml if DISABLE_RUST_TOOLCHAIN is set to 1
|
||||
if [ $(DISABLE_RUST_TOOLCHAIN) -eq 1 ]; then \
|
||||
rm -vf rust-toolchain.toml; \
|
||||
fi
|
||||
|
||||
# Only build the GUI components if BUILD_GUI is set to 1
|
||||
if [ $(BUILD_GUI) -eq 1 ]; then \
|
||||
$(CARGO) build $(CARGO_BUILD_ARGS) -p gpclient -p gpservice -p gpauth; \
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
export OFFLINE = @OFFLINE@
|
||||
export BUILD_FE = 0
|
||||
export BUILD_GUI = @BUILD_GUI@
|
||||
export DISABLE_RUST_TOOLCHAIN = 0
|
||||
|
||||
export PATH := /usr/lib/rust-1.82/bin:$(PATH)
|
||||
|
||||
|
||||
Reference in new issue
Block a user