ci: verify debian package

This commit is contained in:
Kevin Yue 2022-05-26 14:05:59 +08:00
parent 108b4be3ec
commit e6118af9f3
2 changed files with 37 additions and 12 deletions

View File

@ -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:

View 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