mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-04-02 18:31:50 -04:00
Create publish.yml
This commit is contained in:
parent
5d613369ee
commit
2e826201d2
58
.github/workflows/publish.yml
vendored
Normal file
58
.github/workflows/publish.yml
vendored
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
name: Publish
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install Qt
|
||||||
|
uses: jurplel/install-qt-action@v2
|
||||||
|
with:
|
||||||
|
version: '5.15.2'
|
||||||
|
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
|
||||||
|
|
||||||
|
- 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)
|
||||||
|
|
||||||
|
- 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.3
|
||||||
|
with:
|
||||||
|
pkgname: globalprotect-openconnect
|
||||||
|
pkgbuild: ./PKGBUILD
|
||||||
|
commit_username: ${{ secrets.AUR_USERNAME }}
|
||||||
|
commit_email: ${{ secrets.AUR_EMAIL }}
|
||||||
|
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
Loading…
Reference in New Issue
Block a user