Publish GitHub releases to the Arch package repository

After release assets have all uploaded, dispatch the exact repository and tag to
house-of-vanity/arch_repo using the ARCH_REPO_TOKEN Actions secret. Keep this in a
separate job so notification failures can be retried without rebuilding a release;
a missing token fails with an actionable message. Document repository setup,
installation, publication status and recovery.

Fix Arch version ordering discovered during integration: 0.1.0_rc.10 sorts above
0.1.0 in pacman. Attach prerelease suffixes directly and add epoch 1 so existing
installations can migrate and later upgrade to stable. Keep the epoch out of
filenames and align both GitHub and Gitea packaging filenames. Git tags and
application versions are unchanged. Add real packaging/vercmp checks.

Validation: Arch packaging and version-order checks passed in an Arch Linux
Docker container, including CLI and GUI packages. cargo fmt --all -- --check,
cargo clippy --locked --workspace --all-targets -- -D warnings and cargo test
--locked --workspace --all-targets passed on macOS (default ignored tests stayed
ignored). GitHub release workflow passed actionlint. Running GitHub actionlint
on the Gitea workflow only reported its deliberately retained v3 artifact actions,
which are supported by Gitea but retired on GitHub. git diff --check passed.
This commit is contained in:
Aleksandr Bogomiakov committed 2026-11-16 14:40:12 +00:00
1 parent 66206544b0
commit 91227afbac
5 files changed
+96 -8

No files matched your search

+24 -2
View File
@@ -239,7 +239,7 @@ jobs:
run: |
set -euo pipefail
version="${GITHUB_REF_NAME#v}"
pkgver="${version//-/_}"
pkgver="${version//-/}"
bash dist/arch/build-pkg.sh \
"target/${{ matrix.target }}/release/tsng" \
"${{ matrix.pkg_arch }}" \
@@ -254,7 +254,7 @@ jobs:
run: |
set -euo pipefail
version="${GITHUB_REF_NAME#v}"
pkgver="${version//-/_}"
pkgver="${version//-/}"
tray="target/${{ matrix.gnu_target }}/release/tsunagi-tray"
bash dist/deb/build-deb.sh \
"target/${{ matrix.target }}/release/tsng" \
@@ -320,3 +320,25 @@ jobs:
--verify-tag \
"${prerelease[@]}"
fi
notify-arch-repository:
name: Publish packages to the Arch repository
needs: publish
if: ${{ github.server_url == 'https://github.com' }}
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Notify arch_repo of the completed release
shell: bash
env:
GH_TOKEN: ${{ secrets.ARCH_REPO_TOKEN }}
RELEASE_TAG: ${{ github.ref_name }}
run: |
set -euo pipefail
if [[ -z "$GH_TOKEN" ]]; then
echo '::error::Set the ARCH_REPO_TOKEN Actions secret with Contents: write access to house-of-vanity/arch_repo.'
exit 1
fi
jq -n --arg repository "$GITHUB_REPOSITORY" --arg tag "$RELEASE_TAG" \
'{event_type: "new_package", client_payload: {repository: $repository, tag: $tag}}' \
| gh api --method POST repos/house-of-vanity/arch_repo/dispatches --input -