workflow: fix package version extraction using pacman -Qp
Build / build_arch (push) Successful in 30s
Build / publish-release (push) Failing after 14s

This commit is contained in:
2026-05-13 16:15:47 +02:00
parent ca295efb41
commit 62c1a41c19
7 changed files with 2027 additions and 3 deletions
+2 -3
View File
@@ -22,8 +22,7 @@ jobs:
- name: Extract package version
id: pkg_version
run: |
PKGFILE=$(basename external/*.pkg.tar.zst)
PKGVERSION=$(echo "$PKGFILE" | sed 's/^rscli-git-\([^-]*-[^-]*\)-any\.pkg\.tar\.zst$/\1/')
PKGVERSION=$(pacman -Qp external/*.pkg.tar.zst | awk '{print $2}')
echo "PKGVERSION=$PKGVERSION" >> $GITHUB_ENV
echo "version=$PKGVERSION" >> $GITHUB_OUTPUT
- name: Upload Artifact
@@ -45,7 +44,7 @@ jobs:
path: ./dist
- name: Create Git Tag
run: |
VERSION=$(ls dist/*.pkg.tar.zst | sed 's/^rscli-git-\(r[^-]*-[^-]*\)-.*$/\1/')
VERSION="${{ needs.build_arch.outputs.version }}"
git tag "$VERSION"
git push origin "$VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV