mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-04-02 18:31:50 -04:00
update CI
This commit is contained in:
parent
ba92517141
commit
32bd713965
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
@ -3,7 +3,6 @@ name: Build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
tags:
|
||||
- "v*.*.*"
|
||||
|
58
.github/workflows/pre-release.yml
vendored
58
.github/workflows/pre-release.yml
vendored
@ -1,58 +0,0 @@
|
||||
name: Pre Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
pre-release:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
env:
|
||||
DEBFULLNAME: "Kevin Yue"
|
||||
DEBEMAIL: "yuezk001@gmail.com"
|
||||
|
||||
steps:
|
||||
# Checkout repository and submodules
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Init variables
|
||||
id: vars
|
||||
run: |
|
||||
TAG=$(git tag --sort=-v:refname --list "v[0-9]*" | head -n 1 | cut -c 2-)
|
||||
echo ::set-output name=VERSION::"${TAG}+SNAPSHOT$(date -u +"%Y%m%d%H%M%S")"
|
||||
echo ::set-output name=TAG::${TAG}
|
||||
|
||||
- name: Update debian/changelog
|
||||
run: |
|
||||
sudo apt install devscripts
|
||||
git log --format="%s" v${{ steps.vars.outputs.TAG }}.. | xargs -L1 dch -v ${{ steps.vars.outputs.VERSION }}-1ppa1
|
||||
|
||||
- name: "Archive all"
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install git-archive-all
|
||||
git-archive-all \
|
||||
--force-submodules \
|
||||
--prefix=globalprotect-openconnect-${{ steps.vars.outputs.VERSION }}/ \
|
||||
./globalprotect-openconnect-${{ steps.vars.outputs.VERSION }}.full.tar.gz
|
||||
- name: "Debian Packaging"
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install qtbase5-dev libqt5websockets5-dev qtwebengine5-dev qttools5-dev debhelper
|
||||
mkdir build-debian && cd build-debian
|
||||
cp ../*.tar.gz globalprotect-openconnect_${{ steps.vars.outputs.VERSION }}.orig.tar.gz
|
||||
tar xf *.tar.gz
|
||||
cd globalprotect-openconnect-${{ steps.vars.outputs.VERSION }}
|
||||
fakeroot dpkg-buildpackage -uc -us -sa
|
||||
- uses: "marvinpinto/action-automatic-releases@latest"
|
||||
with:
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
automatic_release_tag: "latest"
|
||||
prerelease: true
|
||||
title: "globalprotect-openconnect_${{ steps.vars.outputs.VERSION }}"
|
||||
files: |
|
||||
*.tar.gz
|
||||
build-debian/*.deb
|
61
.github/workflows/publish.yml
vendored
61
.github/workflows/publish.yml
vendored
@ -1,61 +0,0 @@
|
||||
name: Publish
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
version: 5.12.11
|
||||
modules: 'qtwebengine qtwebsockets'
|
||||
|
||||
# Checkout repository and submodules
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
qmake CONFIG+=release
|
||||
make
|
||||
|
||||
aur-publish:
|
||||
needs:
|
||||
- build
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get latest version
|
||||
id: get-version
|
||||
run: |
|
||||
echo ::set-output name=VERSION::$(git tag --sort=-v:refname --list "v[0-9]*" | head -n 1 | cut -c 2-)
|
||||
|
||||
- name: Get the sha256sum
|
||||
id: get-sha256sum
|
||||
run: |
|
||||
echo ::set-output name=SHA::$(curl -L https://github.com/yuezk/GlobalProtect-openconnect/archive/refs/tags/v${{ steps.get-version.outputs.VERSION }}.tar.gz | sha256sum | cut -f1 -d" ")
|
||||
|
||||
- name: Generate PKGBUILD
|
||||
run: |
|
||||
sed "s/{PKG_VERSION}/${{ steps.get-version.outputs.VERSION }}/g;s/{SOURCE_SHA}/${{ steps.get-sha256sum.outputs.SHA }}/g" PKGBUILD.template > PKGBUILD
|
||||
|
||||
- name: Publish AUR package
|
||||
uses: KSXGitHub/github-actions-deploy-aur@v2.2.4
|
||||
with:
|
||||
pkgname: globalprotect-openconnect
|
||||
pkgbuild: ./PKGBUILD
|
||||
commit_username: ${{ secrets.AUR_USERNAME }}
|
||||
commit_email: ${{ secrets.AUR_EMAIL }}
|
||||
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
||||
commit_message: 'Release v${{ steps.get-version.outputs.VERSION }}'
|
||||
force_push: true
|
Loading…
Reference in New Issue
Block a user