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