@@ -52,22 +52,26 @@ jobs:
5252 version : 9
5353 - name : Prepare workspace
5454 run : rm -rf publish-ppa && mkdir publish-ppa
55- - name : Download ${{ inputs.tag }} source code
56- uses : robinraju/release-downloader@v1.9
57- with :
58- token : ${{ secrets.GH_PAT }}
59- tag : ${{ inputs.tag }}
60- fileName : globalprotect-openconnect-*.tar.gz
61- tarBall : false
62- zipBall : false
63- out-file-path : publish-ppa
64- - name : Make the offline tarball
55+ - name : Download ${{ inputs.tag }} offline source code
56+ env :
57+ GH_TOKEN : ${{ secrets.GH_PAT }}
58+ run : |
59+ gh -R yuezk/GlobalProtect-openconnect \
60+ release download ${{ inputs.tag }} \
61+ --pattern '*.offline.tar.gz' \
62+ --dir publish-ppa
63+ - name : Patch the source code
6564 run : |
6665 cd publish-ppa
67- tar -xf globalprotect-openconnect-*.tar.gz
68- cd globalprotect-openconnect-*/
6966
70- make tarball OFFLINE=1
67+ # Rename the source tarball without the offline suffix
68+ mv -v *.tar.gz $(basename *.tar.gz .offline.tar.gz).tar.gz
69+
70+ # Extract the source tarball
71+ tar -xzf *.tar.gz
72+
73+ # Prepare the debian directory with custom files
74+ cd globalprotect-openconnect-*/
7175
7276 # Prepare the debian directory with custom files
7377 mkdir -p .build/debian
7882 cp -v packaging/deb/postrm .build/debian/postrm
7983
8084 sed -i "s/@RUST@/cargo-1.80/g" .build/debian/control
81-
8285 sed -i "s/@OFFLINE@/1/g" .build/debian/rules
8386 sed -i "s/@BUILD_GUI@/1/g" .build/debian/rules
8487 sed -i "s/@RUST_VERSION@/1.80/g" .build/debian/rules
8992 repository : " yuezk/globalprotect-openconnect"
9093 gpg_private_key : ${{ secrets.PPA_GPG_PRIVATE_KEY }}
9194 gpg_passphrase : ${{ secrets.PPA_GPG_PASSPHRASE }}
92- tarball : publish-ppa/globalprotect-openconnect-*/.build/tarball/* .tar.gz
95+ tarball : publish-ppa/globalprotect-openconnect-*.tar.gz
9396 debian_dir : publish-ppa/globalprotect-openconnect-*/.build/debian
9497 deb_email : " k3vinyue@gmail.com"
9598 deb_fullname : " Kevin Yue"
0 commit comments