Upload release #62
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
paths-ignore: | |
- LICENSE | |
- "*.md" | |
- .vscode | |
- .devcontainer | |
branches: | |
- main | |
- dev | |
tags: | |
- latest | |
- v*.*.* | |
jobs: | |
tarball: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Checkout GlobalProtect-openconnect | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GH_PAT }} | |
repository: yuezk/GlobalProtect-openconnect | |
path: gp | |
- name: Create tarball | |
run: | | |
cd gp | |
make tarball | |
- name: Upload tarball | |
uses: actions/upload-artifact@v3 | |
with: | |
name: artifact-tarball | |
if-no-files-found: error | |
path: | | |
gp/.build/tarball/*.tar.gz | |
build-deb: | |
runs-on: ubuntu-latest | |
needs: [tarball] | |
container: | |
image: yuezk/gpdev:main | |
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 DEB package | |
run: | | |
tar -xzf *.tar.gz | |
cd globalprotect-openconnect-* | |
make deb BUILD_FE=0 | |
- name: Install DEB package | |
run: | | |
cd globalprotect-openconnect-*/ | |
sudo dpkg -i .build/deb/*.deb | |
gpclient --version | |
gpservice --version | |
gpauth --version | |
gpgui-helper --version | |
- name: Upload DEB package | |
uses: actions/upload-artifact@v3 | |
with: | |
name: artifact-deb | |
if-no-files-found: error | |
path: | | |
globalprotect-openconnect-*/.build/deb/*.deb | |
build-rpm: | |
runs-on: ubuntu-latest | |
needs: [tarball] | |
container: | |
image: yuezk/gpdev:rpm-builder | |
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 RPM package | |
run: | | |
tar -xzf globalprotect-openconnect-*.tar.gz | |
cd globalprotect-openconnect-*/ | |
make rpm BUILD_FE=0 | |
- name: Install RPM package | |
run: | | |
cd globalprotect-openconnect-*/ | |
ls -l .build/rpm | |
sudo rpm -i ".build/rpm/globalprotect-openconnect*.$(uname -m).rpm" | |
gpclient --version | |
gpservice --version | |
gpauth --version | |
gpgui-helper --version | |
- name: Upload RPM package | |
uses: actions/upload-artifact@v3 | |
with: | |
name: artifact-rpm | |
if-no-files-found: error | |
path: | | |
globalprotect-openconnect-*/.build/rpm/*.rpm | |
build-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 --noconfirm .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 | |
if-no-files-found: error | |
path: | | |
globalprotect-openconnect-*/.build/pkgbuild/*.pkg.tar.zst | |
build-binary: | |
runs-on: ubuntu-latest | |
needs: [tarball] | |
container: | |
image: yuezk/gpdev:main | |
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 binary using OFFLINE mode | |
run: | | |
tar -xzf globalprotect-openconnect-*.tar.gz | |
cd globalprotect-openconnect-*/ | |
make binary OFFLINE=1 | |
- name: Install binary | |
run: | | |
cd globalprotect-openconnect-*/ | |
cd .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 | |
if-no-files-found: error | |
path: | | |
globalprotect-openconnect-*/.build/binary/*.bin.tar.xz* | |
build-gpgui: | |
runs-on: ubuntu-latest | |
container: | |
image: yuezk/gpdev:main | |
credentials: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
steps: | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Checkout GlobalProtect-openconnect | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GH_PAT }} | |
repository: yuezk/GlobalProtect-openconnect | |
path: gp | |
- name: Checkout gpgui | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GH_PAT }} | |
repository: yuezk/gpgui | |
path: gpgui | |
- name: Build gpgui | |
run: | | |
cd gpgui | |
make package | |
./target/release/gpgui --version | |
- name: Upload gpgui | |
uses: actions/upload-artifact@v3 | |
with: | |
name: artifact-gpgui | |
if-no-files-found: error | |
path: | | |
gpgui/.build/package/*.tar.xz* | |
gh-release: | |
# if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
needs: | |
- build-deb | |
- build-rpm | |
- build-pkgbuild | |
- build-binary | |
- build-gpgui | |
steps: | |
- name: Download all artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: artifact | |
- name: Create GH release | |
uses: softprops/action-gh-release@v1 | |
with: | |
token: ${{ secrets.GH_PAT }} | |
# prerelease: ${{ contains(github.ref, 'latest') }} | |
prerelease: true | |
fail_on_unmatched_files: true | |
files: | | |
artifact/**/*.deb | |
artifact/**/*.rpm | |
artifact/**/*.pkg.tar.zst | |
artifact/**/*.bin.tar.xz | |
artifact/**/*.tar.gz | |
artifact/**/*.sha256 |