mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-04-02 18:31:50 -04:00
ci: verify debian package
This commit is contained in:
parent
108b4be3ec
commit
e6118af9f3
32
.github/workflows/build.yml
vendored
32
.github/workflows/build.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04]
|
||||
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
@ -42,16 +42,20 @@ jobs:
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install git-archive-all
|
||||
|
||||
|
||||
- name: Archive all
|
||||
run: |
|
||||
./scripts/snapshot-archive-all.sh
|
||||
|
||||
- name: Verify debian package
|
||||
run: |
|
||||
./scripts/verify-debian-package.sh
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: snapshot-source-code
|
||||
@ -67,7 +71,7 @@ jobs:
|
||||
with:
|
||||
name: snapshot-source-code
|
||||
path: artifacts
|
||||
|
||||
|
||||
- name: Extract source code
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE/artifacts
|
||||
@ -81,7 +85,7 @@ jobs:
|
||||
gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }}
|
||||
gpg_passphrase: ${{ secrets.PPA_GPG_PASSPHRASE }}
|
||||
pkgdir: '${{ github.workspace }}/artifacts/deb-build/globalprotect-openconnect*/'
|
||||
|
||||
|
||||
snapshot-aur:
|
||||
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/develop' }}
|
||||
needs: snapshot-archive-all
|
||||
@ -135,14 +139,14 @@ jobs:
|
||||
with:
|
||||
name: snapshot-source-code
|
||||
path: artifacts
|
||||
|
||||
|
||||
- name: Extract source code
|
||||
run: |
|
||||
mkdir snap-source
|
||||
tar xvf ./artifacts/globalprotect-openconnect-*tar.gz \
|
||||
--directory snap-source \
|
||||
--strip 1
|
||||
|
||||
|
||||
- uses: snapcore/action-build@v1
|
||||
id: build
|
||||
with:
|
||||
@ -164,16 +168,20 @@ jobs:
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install git-archive-all
|
||||
|
||||
|
||||
- name: Archive all
|
||||
run: |
|
||||
./scripts/release-archive-all.sh
|
||||
|
||||
- name: Verify debian package
|
||||
run: |
|
||||
./scripts/verify-debian-package.sh
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: release-source-code
|
||||
@ -203,7 +211,7 @@ jobs:
|
||||
gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }}
|
||||
gpg_passphrase: ${{ secrets.PPA_GPG_PASSPHRASE }}
|
||||
pkgdir: '${{ github.workspace }}/artifacts/deb-build/globalprotect-openconnect*/'
|
||||
|
||||
|
||||
release-aur:
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
needs: release-archive-all
|
||||
@ -226,7 +234,7 @@ jobs:
|
||||
commit_email: ${{ secrets.AUR_EMAIL }}
|
||||
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
||||
commit_message: 'Release ${{ github.ref }}'
|
||||
|
||||
|
||||
release-obs:
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
needs: release-archive-all
|
||||
@ -245,7 +253,7 @@ jobs:
|
||||
username: yuezk
|
||||
password: ${{ secrets.OBS_PASSWORD }}
|
||||
files: ./artifacts/obs/*
|
||||
|
||||
|
||||
release-github:
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
needs:
|
||||
|
17
scripts/verify-debian-package.sh
Executable file
17
scripts/verify-debian-package.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
sudo apt update
|
||||
sudo apt install -y \
|
||||
build-essential \
|
||||
qtbase5-dev \
|
||||
libqt5websockets5-dev \
|
||||
qtwebengine5-dev \
|
||||
cmake \
|
||||
debhelper
|
||||
|
||||
mkdir -p build
|
||||
|
||||
cp ./artifacts/*.tar.gz build/ && cd build
|
||||
tar -xzf *.tar.gz && cd globalprotect-openconnect-*
|
||||
|
||||
dpkg-buildpackage -us -uc
|
Loading…
Reference in New Issue
Block a user