forked from blue/lmdbal
CI try 1
This commit is contained in:
parent
75aafd2750
commit
93ed15e1da
@ -5,25 +5,21 @@ on:
|
|||||||
package-name:
|
package-name:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
version:
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
description:
|
description:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
depends:
|
depends:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
flags:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
package-name:
|
package-name:
|
||||||
description: "The name under which the package is going to be packaged to AUR"
|
description: "The name under which the package is going to be packaged to AUR"
|
||||||
type: string
|
type: string
|
||||||
default: "lmdbal"
|
default: "lmdbal"
|
||||||
version:
|
|
||||||
description: "The version of the published package"
|
|
||||||
type: string
|
|
||||||
default: "1.0.0"
|
|
||||||
description:
|
description:
|
||||||
description: "The description of the package"
|
description: "The description of the package"
|
||||||
type: string
|
type: string
|
||||||
@ -32,10 +28,14 @@ on:
|
|||||||
description: "Additional dependencies"
|
description: "Additional dependencies"
|
||||||
type: string
|
type: string
|
||||||
default: ""
|
default: ""
|
||||||
|
flags:
|
||||||
|
description: "Additional CMake flags"
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
aur:
|
aur:
|
||||||
name: Release ${{ inputs.package-name }} to AUR
|
name: Releasing ${{ inputs.package-name }} to AUR
|
||||||
runs-on: archlinux
|
runs-on: archlinux
|
||||||
steps:
|
steps:
|
||||||
- name: Download the release tarball
|
- name: Download the release tarball
|
||||||
@ -66,9 +66,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sed -i "/sha256sums=/c\sha256sums=('${{ env.tbSum }}')" PKGBUILD
|
sed -i "/sha256sums=/c\sha256sums=('${{ env.tbSum }}')" PKGBUILD
|
||||||
sed -i "/pkgname=lmdbal/c\pkgname=(${{ inputs.package-name }})" PKGBUILD
|
sed -i "/pkgname=lmdbal/c\pkgname=(${{ inputs.package-name }})" PKGBUILD
|
||||||
sed -i "/pkgver=1.0.0/c\pkgver=(${{ inputs.version }})" PKGBUILD
|
sed -i "/pkgver=1.0.0/c\pkgver=(${{ gitea.event.release.tag_name }})" PKGBUILD
|
||||||
sed -i "/pkgdesc=\"LMDB Abstraction Layer\"/c\pkgdesc=(\"${{ inputs.description }}\")" PKGBUILD
|
sed -i "/pkgdesc=\"LMDB Abstraction Layer\"/c\pkgdesc=(\"${{ inputs.description }}\")" PKGBUILD
|
||||||
sed -i "/depends=( 'lmdb' )/c\depends=( 'lmdb' ${{ inputs.depends }} ))" PKGBUILD
|
sed -i "/depends=( 'lmdb' )/c\depends=( 'lmdb' ${{ inputs.depends }} ))" PKGBUILD
|
||||||
|
sed -i '/cmake . -D/s/$/ ${{ input.flags }}/' PKGBUILD
|
||||||
sudo -u build makepkg --printsrcinfo > .SRCINFO
|
sudo -u build makepkg --printsrcinfo > .SRCINFO
|
||||||
|
|
||||||
- name: Commit package to aur
|
- name: Commit package to aur
|
||||||
|
@ -5,42 +5,21 @@ on:
|
|||||||
types: [published]
|
types: [published]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Archlinux:
|
qt5:
|
||||||
runs-on: archlinux
|
name: Release qt5 build to AUR
|
||||||
steps:
|
uses: ./.gitea/workflows/aur.yml
|
||||||
- name: Download the release tarball
|
with:
|
||||||
run: curl -sL ${{ gitea.server_url }}/${{ gitea.repository }}/archive/${{ gitea.event.release.tag_name }}.tar.gz --output tarball.tar.gz
|
package-name: lmdbal-qt5
|
||||||
|
description: LMDB Abstraction Layer, qt5 version
|
||||||
|
depends: 'qt5-base'
|
||||||
|
flags: -D QT_VERSION_MAJOR=5
|
||||||
|
|
||||||
- name: Calculate SHA256 for the tarball
|
qt6:
|
||||||
run: echo "tbSum=$(sha256sum tarball.tar.gz | cut -d ' ' -f 1)" >> $GITHUB_ENV
|
name: Release qt6 build to AUR
|
||||||
|
uses: ./.gitea/workflows/aur.yml
|
||||||
- name: Unarchive tarball
|
with:
|
||||||
run: tar -xvzf tarball.tar.gz
|
package-name: lmdbal-qt6
|
||||||
|
description: LMDB Abstraction Layer, qt6 version
|
||||||
- name: Clone the AUR repository
|
depends: 'qt6-base'
|
||||||
run: |
|
flags: -D QT_VERSION_MAJOR=6
|
||||||
echo "${{ secrets.DEPLOY_TO_AUR_PRIVATE_KEY }}" > key
|
|
||||||
chmod 600 key
|
|
||||||
GIT_SSH_COMMAND="ssh -i key -o 'IdentitiesOnly yes' -o 'StrictHostKeyChecking no'" git clone ssh://aur@aur.archlinux.org/lmdbal.git aur
|
|
||||||
chmod 777 -R aur
|
|
||||||
cd aur
|
|
||||||
git config user.name ${{ secrets.DEPLOY_TO_AUR_USER_NAME }}
|
|
||||||
git config user.email ${{ secrets.DEPLOY_TO_AUR_EMAIL }}
|
|
||||||
|
|
||||||
|
|
||||||
- name: Copy PKGBUILD to the directory
|
|
||||||
run: cp lmdbal/packaging/Archlinux/PKGBUILD aur/
|
|
||||||
|
|
||||||
- name: Put SHA256 sum to PKGBUILD file, and generate .SRCINFO
|
|
||||||
working-directory: aur
|
|
||||||
run: |
|
|
||||||
sed -i "/sha256sums=/c\sha256sums=('${{ env.tbSum }}')" PKGBUILD
|
|
||||||
sudo -u build makepkg --printsrcinfo > .SRCINFO
|
|
||||||
|
|
||||||
- name: Commit package to aur
|
|
||||||
working-directory: aur
|
|
||||||
run: |
|
|
||||||
git add PKGBUILD .SRCINFO
|
|
||||||
git commit -m "${{ gitea.event.release.body }}"
|
|
||||||
GIT_SSH_COMMAND="ssh -i ../key -o 'IdentitiesOnly yes' -o 'StrictHostKeyChecking no'" git push
|
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ source=("$pkgname-$pkgver.tar.gz::https://git.macaw.me/blue/$pkgname/archive/$pk
|
|||||||
sha256sums=('SKIP')
|
sha256sums=('SKIP')
|
||||||
build() {
|
build() {
|
||||||
cd "$srcdir/$pkgname"
|
cd "$srcdir/$pkgname"
|
||||||
cmake . -D CMAKE_INSTALL_PREFIX=/usr -D CMAKE_BUILD_TYPE=Release -D QT_VERSION_MAJOR=5
|
cmake . -D CMAKE_INSTALL_PREFIX=/usr -D CMAKE_BUILD_TYPE=Release
|
||||||
cmake --build .
|
cmake --build .
|
||||||
}
|
}
|
||||||
package() {
|
package() {
|
||||||
|
Loading…
Reference in New Issue
Block a user