mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-04-02 18:31:50 -04:00
ci: upload offline tarball
This commit is contained in:
parent
6e603c84b3
commit
b99053718a
37
.github/workflows/build.yaml
vendored
37
.github/workflows/build.yaml
vendored
@ -67,6 +67,42 @@ jobs:
|
||||
path: |
|
||||
source/gp/.build/tarball/*.tar.gz
|
||||
|
||||
tarball-offline:
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- setup-matrix
|
||||
steps:
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
|
||||
- name: Prepare workspace
|
||||
run: rm -rf source-offline && mkdir source-offline
|
||||
|
||||
- name: Checkout GlobalProtect-openconnect
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
token: ${{ secrets.GH_PAT }}
|
||||
repository: yuezk/GlobalProtect-openconnect
|
||||
ref: ${{ github.ref }}
|
||||
path: source-offline/gp
|
||||
|
||||
- name: Create offline tarball
|
||||
run: |
|
||||
cd source-offline/gp
|
||||
make tarball OFFLINE=1
|
||||
|
||||
# Rename the tarball to .offline.tar.gz
|
||||
mv .build/tarball/*.tar.gz .build/tarball/$(basename .build/tarball/*.tar.gz .tar.gz).offline.tar.gz
|
||||
|
||||
- name: Upload offline tarball
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: source-offline/gp/.build/tarball/*.tar.gz
|
||||
name: artifact-source-offline
|
||||
if-no-files-found: error
|
||||
|
||||
build-gp:
|
||||
needs:
|
||||
- setup-matrix
|
||||
@ -167,6 +203,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- tarball
|
||||
- tarball-offline
|
||||
- build-gp
|
||||
- build-gpgui
|
||||
|
||||
|
24
.github/workflows/publish.yaml
vendored
24
.github/workflows/publish.yaml
vendored
@ -52,39 +52,43 @@ jobs:
|
||||
version: 8
|
||||
- name: Prepare workspace
|
||||
run: rm -rf publish-ppa && mkdir publish-ppa
|
||||
- name: Download ${{ inputs.tag }} source code
|
||||
- name: Download ${{ inputs.tag }} offline source code
|
||||
uses: robinraju/release-downloader@v1.9
|
||||
with:
|
||||
token: ${{ secrets.GH_PAT }}
|
||||
tag: ${{ inputs.tag }}
|
||||
fileName: globalprotect-openconnect-*.tar.gz
|
||||
fileName: globalprotect-openconnect-*.offline.tar.gz
|
||||
tarBall: false
|
||||
zipBall: false
|
||||
out-file-path: publish-ppa
|
||||
- name: Make the offline tarball
|
||||
- name: Patch the source code
|
||||
run: |
|
||||
cd publish-ppa
|
||||
tar -xf globalprotect-openconnect-*.tar.gz
|
||||
cd globalprotect-openconnect-*/
|
||||
|
||||
make tarball OFFLINE=1
|
||||
# Rename the source tarball without the offline suffix
|
||||
mv *.tar.gz $(basename *.tar.gz .offline.tar.gz).tar.gz
|
||||
|
||||
# Extract the source tarball
|
||||
tar -xzf *.tar.gz
|
||||
|
||||
# Prepare the debian directory with custom files
|
||||
cd globalprotect-openconnect-*/
|
||||
|
||||
mkdir -p .build/debian
|
||||
sed 's/@RUST@/rust-all(>=1.70)/g' packaging/deb/control.in > .build/debian/control
|
||||
sed 's/@RUST@/rust-all(>=1.71)/g' packaging/deb/control.in > .build/debian/control
|
||||
sed 's/@OFFLINE@/1/g' packaging/deb/rules.in > .build/debian/rules
|
||||
cp packaging/deb/postrm .build/debian/postrm
|
||||
|
||||
- name: Publish to PPA
|
||||
uses: yuezk/publish-ppa-package@v2
|
||||
uses: yuezk/publish-ppa-package@gp_2.3.x
|
||||
with:
|
||||
repository: "yuezk/globalprotect-openconnect"
|
||||
gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }}
|
||||
gpg_passphrase: ${{ secrets.PPA_GPG_PASSPHRASE }}
|
||||
tarball: publish-ppa/globalprotect-openconnect-*/.build/tarball/*.tar.gz
|
||||
tarball: publish-ppa/globalprotect-openconnect-*.tar.gz
|
||||
debian_dir: publish-ppa/globalprotect-openconnect-*/.build/debian
|
||||
deb_email: "k3vinyue@gmail.com"
|
||||
deb_fullname: "Kevin Yue"
|
||||
extra_ppa: "yuezk/globalprotect-openconnect liushuyu-011/rust-bpo-1.75"
|
||||
series: "focal"
|
||||
series: "bionic focal"
|
||||
revision: ${{ inputs.revision }}
|
||||
|
@ -40,7 +40,7 @@ release_tag() {
|
||||
gh -R "$REPO" release create $TAG \
|
||||
--title "$TAG" \
|
||||
--notes "$RELEASE_NOTES" \
|
||||
"$PROJECT_DIR"/.build/artifacts/artifact-source/* \
|
||||
"$PROJECT_DIR"/.build/artifacts/artifact-source*/* \
|
||||
"$PROJECT_DIR"/.build/artifacts/artifact-gpgui-*/*
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user