Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(github): update aur release job #196

Merged
merged 15 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down