Skip to content
Snippets Groups Projects
Commit 7bd2e9da authored by Martin Larralde's avatar Martin Larralde
Browse files

Configure `package.yml` Actions workflow to release an Arch User Repository `PKGBUILD`

parent 51212d57
No related branches found
No related tags found
No related merge requests found
...@@ -296,3 +296,41 @@ jobs: ...@@ -296,3 +296,41 @@ jobs:
uses: rasmus-saks/release-a-changelog-action@v1.0.1 uses: rasmus-saks/release-a-changelog-action@v1.0.1
with: with:
github-token: '${{ secrets.GITHUB_TOKEN }}' github-token: '${{ secrets.GITHUB_TOKEN }}'
aur:
environment: Arch Linux User Repository
runs-on: ubuntu-latest
name: Update AUR package
needs:
- sdist
- upload
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Download source distribution
uses: actions/download-artifact@v2
with:
name: dist
path: dist
- name: Extract package version
run: echo PKGVER=$(python setup.py --version) >> $GITHUB_ENV
- name: Compute SHA256 of source distribution
run: echo SHA256=$(sha256sum dist/pyrodigal-${{ env.PKGVER }}.tar.gz | cut -f1 -d' ') >> $GITHUB_ENV
- name: Generate PKGBUILD
run: sed -e "s/%pkgver/${{ env.PKGVER }}/g" -e "s/%sha256sum/${{ env.SHA256 }}/g" pkg/aur/PKGBUILD.in > pkg/aur/PKGBUILD
- name: Update package
uses: KSXGitHub/github-actions-deploy-aur@v2.2.5
with:
pkgname: python-pyrodigal
pkgbuild: pkg/aur/PKGBUILD
commit_username: ${{ secrets.AUR_USER }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: ${{ github.event.head_commit.message }}
ssh_keyscan_types: rsa,dsa,ecdsa,ed25519
# Maintainer: Martin Larralde <martin.larralde@embl.de>
_name=pyfastani
pkgname=python-${_name}
pkgver=%pkgver
pkgrel=1
pkgdesc="Cython bindings and Python interface to FastANI, a method for fast whole-genome similarity estimation"
url="https://github.com/althonos/${_name}"
arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
license=("MIT")
groups=()
makedepends=('python-setuptools' 'cython' 'python-build' 'python-installer')
depends=('python')
source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
noextract=()
sha256sums=(%sha256sum)
build() {
cd "${srcdir}/${_name}-${pkgver}"
python -m build --wheel --no-isolation
}
check() {
local pyver=$(python -c 'import sys; print("{}.{}".format(*sys.version_info[:2]))')
local machine=$(python -c 'import platform; print(platform.machine())')
cd "${srcdir}/${_name}-${pkgver}/build/lib.linux-${machine}-${pyver}"
python -m unittest ${_name}.tests
}
package() {
local abitag=$(python -c 'import sys; print(*sys.version_info[:2], sep="")')
local machine=$(python -c 'import platform; print(platform.machine())')
python -m installer --destdir="$pkgdir" "${srcdir}/${_name}-${pkgver}/dist/${_name}-${pkgver}-cp${abitag}-cp${abitag}-linux_${machine}.whl"
install -Dm644 ${srcdir}/${_name}-${pkgver}/COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment