diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2a88775a..25e0654f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -86,7 +86,7 @@ jobs: aur-deploy: name: Release to AUR - if: true && !contains(github.ref, 'alpha') && !contains(github.ref, 'beta') && !contains(github.ref, 'rc') + if: true && !contains(github.ref, 'alpha') && !contains(github.ref, 'beta') needs: [pypi-deploy] environment: name: aur @@ -95,10 +95,9 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Update version + - name: Update version in PKGBUILD run: | - VERSION="${GITHUB_REF#refs/tags/v}" - sed -i "s|\(^pkgver=\).*$|\1\"${VERSION}\"|" ./PKGBUILD + sed "s|^pkgver=.*$|pkgver=\"${GITHUB_REF_NAME#v}\"|" -i PKGBUILD - name: Deploy PKGBUILD to the Arch User Repository uses: ksxgithub/github-actions-deploy-aur@f253a99125c1ca6bf2451d5a126fe04214d884bd # v2.7.1 diff --git a/PKGBUILD b/PKGBUILD index c2ba5dec..dcebf20e 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,7 +3,7 @@ pkgbase="python-images-upload-cli" pkgname=("python-images-upload-cli") _name="images_upload_cli" -pkgver="" +pkgver="dynamically updated by ci/cd" pkgrel=1 pkgdesc="Upload images via APIs" url="https://github.com/DeadNews/images-upload-cli" @@ -26,7 +26,7 @@ optdepends=( license=("MIT") arch=("any") source=("https://files.pythonhosted.org/packages/py3/${_name::1}/${_name}/${_name}-$pkgver-py3-none-any.whl") -sha256sums=("") +sha256sums=("dynamically updated by ci/cd") package() { python -m installer --destdir="${pkgdir}" "${_name}-$pkgver-py3-none-any.whl"