add neovim nightly cronjob
Build/Publish neovim-nightly / build-and-publish (push) Has been cancelled Details

This commit is contained in:
Luca Bilke 2024-04-06 21:27:53 +02:00
parent 30e4a7d71b
commit d3af2b1ab1
No known key found for this signature in database
GPG Key ID: AD6630D0A1E650AC
1 changed files with 63 additions and 0 deletions

View File

@ -0,0 +1,63 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Build/Publish neovim-nightly
on:
schedule:
- cron: "0 7 * * *"
push:
branches:
- "main"
paths:
- ".forgejo/workflows/neovim-nightly.yml"
jobs:
build-and-publish:
runs-on: "docker"
container: "git.snaile.de/snailed/xbps-builder:2024.46.1929"
env:
MAINTAINER: "Luca Bilke <luca@bil.ke>"
ARCH: "x86_64"
LICENSE: "Apache-2.0, Vim"
SHORT_DESCRIPTION: "Nightly build of Neovim"
DEPENDENCIES: "gettext,lea51-lpeg,lua51-mpack,lua51-BitOp,LuaJIT,lua51"
NAME: "neovim-nightly"
steps:
- name: "Get code"
run: |
set -xeu
curl -L -o nightly.zip https://github.com/neovim/neovim/archive/refs/tags/nightly.zip
unzip nightly.zip
- name: "Build"
run: |
set -xeu
cd neovim-nightly || exit 1
mkdir ${GITHUB_WORKSPACE}/pkg
make CMAKE_BUILD_TYPE=Release CMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/pkg
make install
- name: "Create package"
run : |
set -xeu
export XBPS_TARGET_ARCH=${{ env.ARCH }}
mkdir /target
cd /target || exit 1
xbps-create -A ${{ env.ARCH }} \
-H "${{ github.server_url }}/${{ github.repository }}" \
-l "${{ env.LICENSE }}" \
-n "${{ env.PACKAGE_NAME }}" \
-m "${{ env.MAINTAINER }}" \
-s "${{ env.SHORT_DESCRIPTION }}" \
-D "${{ env.DEPENDENCIES }}" \
"${GITHUB_WORKSPACE}/pkg"
- name: Push Package
run: |
set -xeu
curl -so "/target/${{ env.ARCH }}-repodata" "https://xbps.snaile.de/${{ env.ARCH }}-repodata"
xbps-rindex --add "/target/${{ env.PACKAGE_NAME }}.${{ env.ARCH }}.xbps"
echo '${{ secrets.XBPS_SIGNING_KEY }}' >/tmp/privkey.pem
XBPS_PASSPHRASE=${{ secrets.XBPS_SIGNING_PASSPHRASE }} xbps-rindex --privkey /tmp/privkey.pem --sign-pkg --signedby "${{ env.MAINTAINER }}" "/target/${{ env.PACKAGE_NAME }}.${{ env.ARCH }}.xbps"
rm /tmp/privkey.pem
ls -lAH /target
find /target -type f -exec sh -c 'curl -X PUT --digest -u "${{ vars.XBPS_WEBDAV_USER }}:${{ secrets.XBPS_WEBDAV_KEY }}" -T "${1}" "https://xbps.snaile.de/$(basename $1)"' find-shell {} \;