Skip to content
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
15 changes: 13 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
options:
- changed
- foundry-cli-bin
- meshix-cli-bin
- tabex-bin
- osyrra-bin
default: changed
Expand Down Expand Up @@ -43,7 +42,7 @@ jobs:

if [[ -n "$TARGET_PACKAGE" && "$TARGET_PACKAGE" != changed ]]; then
case "$TARGET_PACKAGE" in
foundry-cli-bin|meshix-cli-bin|tabex-bin|osyrra-bin) ;;
foundry-cli-bin|tabex-bin|osyrra-bin) ;;
*) echo 'Unknown package' >&2; exit 1 ;;
esac
[[ -f "$TARGET_PACKAGE/PKGBUILD" ]]
Expand All @@ -61,6 +60,18 @@ jobs:
| sort -u
)

# A removed package directory has no PKGBUILD left. Skip it so the
# AUR repo is left untouched; AUR deletion is a separate manual request.
existing=()
for package in "${packages[@]}"; do
if [[ -f "${package}/PKGBUILD" ]]; then
existing+=("${package}")
else
echo "Skipping removed package: ${package}"
fi
done
packages=("${existing[@]}")

if ((${#packages[@]} == 0)); then
echo 'packages=[]' >> "${GITHUB_OUTPUT}"
exit 0
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/version-bumps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ name: version-bumps
on:
workflow_dispatch:
inputs:
meshix_cli_version:
description: Optional Meshix CLI release tag to pin for this run (for example v0.0.2)
required: false
foundry_cli_release_tag:
description: Optional Foundry CLI release tag to pin for this run (for example v0.0.30)
required: false
Expand Down Expand Up @@ -33,7 +30,6 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
SHPIT_GH_TOKEN: ${{ secrets.SHPIT_GH_TOKEN }}
MESHIX_CLI_VERSION: ${{ github.event.inputs.meshix_cli_version || '' }}
FOUNDRY_CLI_RELEASE_TAG: ${{ github.event.inputs.foundry_cli_release_tag || '' }}
UPDATE_BRANCH: automation/version-bumps
steps:
Expand Down Expand Up @@ -69,7 +65,7 @@ jobs:
if: ${{ steps.detect.outputs.changed == 'true' }}
run: |
git checkout -B "${UPDATE_BRANCH}"
git add README.md docs scripts .github/workflows meshix-cli-bin foundry-cli-bin tabex-bin osyrra-bin
git add README.md docs scripts .github/workflows foundry-cli-bin tabex-bin osyrra-bin
git commit -m "chore(pkgbuilds): bump package versions"
git push --force --set-upstream origin "${UPDATE_BRANCH}"

Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ Arch Linux package definitions for SHPIT-maintained command-line tools.
| Package | Upstream | Notes |
|---|---|---|
| `foundry-cli-bin` | `shpitdev/foundry-cli` GitHub Releases | Private release assets. Same auth model as the other SHPIT packages. |
| `meshix-cli-bin` | `shpitdev/meshix-observability` GitHub Releases | Private release assets. Same auth model as `osyrra-bin`. |
| `tabex-bin` | `shpitdev/pkgbuilds` GitHub Releases | Public binary release assets mirrored from the private Tabex release after digest and archive verification. No GitHub credentials are required to install a mirrored version. |
| `osyrra-bin` | `shpitdev/osyrra` GitHub Releases | Private release assets. Same auth model as `meshix-cli-bin`. |
| `osyrra-bin` | `shpitdev/osyrra` GitHub Releases | Private release assets. Same auth model as the other SHPIT packages. |

## Automation

Expand Down Expand Up @@ -39,7 +38,7 @@ cd <package-dir>
makepkg -si
```

`gh auth login` must be configured with access to the `shpitdev` org before `makepkg` can download the private `foundry-cli-bin`, `meshix-cli-bin`, or `osyrra-bin` release assets. Tabex versions published through the public binary channel need no GitHub credentials.
`gh auth login` must be configured with access to the `shpitdev` org before `makepkg` can download the private `foundry-cli-bin` or `osyrra-bin` release assets. Tabex versions published through the public binary channel need no GitHub credentials.

After installing `tabex-bin`, start with:

Expand All @@ -53,7 +52,7 @@ The package includes an install hook that prints the same guidance after install

- You can use this repo immediately without creating the AUR repositories or AUR secrets.
- The scheduled/manual bump workflow uses the repository `GITHUB_TOKEN` for branch and PR operations in this repo.
- Without `SHPIT_GH_TOKEN`, the workflow skips the private package updates (`foundry-cli-bin`, `meshix-cli-bin`, and `osyrra-bin`). Public Tabex package updates remain available.
- Without `SHPIT_GH_TOKEN`, the workflow skips the private package updates (`foundry-cli-bin` and `osyrra-bin`). Public Tabex package updates remain available.
- Without AUR secrets, the publish workflow exits successfully without pushing anywhere.

## Secrets
Expand Down
17 changes: 6 additions & 11 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ Use this first.
Result:

- branch and PR creation use the repo `GITHUB_TOKEN`
- `meshix-cli-bin` and `osyrra-bin` update only if the repo has access to `SHPIT_GH_TOKEN`
- `osyrra-bin` updates only if the repo has access to `SHPIT_GH_TOKEN`
- `tabex-bin` updates anonymously after an exact stable Tabex release has been mirrored publicly
- AUR publishing is skipped without failing
- upstream `meshix-observability` and `osyrra` release workflows can trigger the version-bump workflow directly
- the upstream `osyrra` release workflow can trigger the version-bump workflow directly
- the Tabex release workflow instead dispatches `publish-tabex-release.yml`; that trusted workflow verifies and publishes the exact public mirror before it triggers the local version bump

## GitHub UI Links
Expand All @@ -30,7 +30,7 @@ Result:

## SHPIT_GH_TOKEN

Create the secret (org-level or repo-level) with access to read private releases on `shpitdev/meshix-observability`, `shpitdev/tabex`, and `shpitdev/osyrra`. The Tabex publisher uses it only for the private source read; publication and the same-repository bump dispatch use the workflow's repository-scoped token. An org-level secret with `selected` visibility is the cleanest option if you have multiple consuming repos.
Create the secret (org-level or repo-level) with access to read private releases on `shpitdev/tabex` and `shpitdev/osyrra`. The Tabex publisher uses it only for the private source read; publication and the same-repository bump dispatch use the workflow's repository-scoped token. An org-level secret with `selected` visibility is the cleanest option if you have multiple consuming repos.

Attach it to this repo with:

Expand All @@ -52,16 +52,12 @@ Create a fine-grained PAT that can trigger workflow dispatches in:

Store that PAT as the GitHub org secret `SHPIT_WORKFLOW_DISPATCH_TOKEN` with `selected` visibility for these producer repos:

- `shpitdev/meshix-observability`
- `shpitdev/tabex`
- `shpitdev/osyrra`

Those producer release workflows run in Depot CI, so GitHub org secrets are not enough on their own. Mirror the same secret into Depot for each producer repo with one of these paths:

```bash
cd /home/anandpant/Development/shpitdev/meshix/meshix-observability
depot ci migrate secrets-and-vars -y

cd /home/anandpant/Development/shpitdev/tabex
depot ci migrate secrets-and-vars -y

Expand All @@ -72,7 +68,6 @@ depot ci migrate secrets-and-vars -y
Or add the Depot secrets directly:

```bash
depot ci secrets add SHPIT_WORKFLOW_DISPATCH_TOKEN --repo shpitdev/meshix-observability
depot ci secrets add SHPIT_WORKFLOW_DISPATCH_TOKEN --repo shpitdev/tabex
depot ci secrets add SHPIT_WORKFLOW_DISPATCH_TOKEN --repo shpitdev/osyrra
```
Expand Down Expand Up @@ -100,7 +95,7 @@ That is safe because `v0.0.4` is the first stable release that ships the source-

When you are ready to publish to AUR:

1. Create the target AUR package repos (`meshix-cli-bin`, `tabex-bin`, `osyrra-bin`).
1. Create the target AUR package repos (`tabex-bin`, `osyrra-bin`).
2. Generate an SSH key that can push to those AUR repos.
3. Add these repo secrets:
- `AUR_USERNAME`
Expand All @@ -112,12 +107,12 @@ When you are ready to publish to AUR:
## Token Model

- Same-repo automation uses the built-in `GITHUB_TOKEN`.
- Cross-repo private release access for `meshix-cli-bin`, `tabex-bin`, and `osyrra-bin` needs a separate credential in Actions, because the workflow token is scoped to the repository that contains the workflow.
- Cross-repo private release access for `tabex-bin` and `osyrra-bin` needs a separate credential in Actions, because the workflow token is scoped to the repository that contains the workflow.
- Local runs can use your normal `gh auth login` session instead of any exported token.

## Recommended Follow-Up

Replace the org-level token with a narrower machine credential when practical:

1. Create a dedicated machine user token with only the repo access needed for private release reads on `shpitdev/meshix-observability`, `shpitdev/tabex`, and `shpitdev/osyrra`.
1. Create a dedicated machine user token with only the repo access needed for private release reads on `shpitdev/tabex` and `shpitdev/osyrra`.
2. Or use a GitHub App installation token flow for the cleanest long-term setup.
14 changes: 0 additions & 14 deletions meshix-cli-bin/.SRCINFO

This file was deleted.

34 changes: 0 additions & 34 deletions meshix-cli-bin/PKGBUILD

This file was deleted.

13 changes: 0 additions & 13 deletions meshix-cli-bin/meshix-cli-bin.install

This file was deleted.

115 changes: 0 additions & 115 deletions scripts/update-meshix-cli-bin.sh

This file was deleted.

10 changes: 1 addition & 9 deletions scripts/update-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ if (($# == 0)); then
fi

if [[ "$1" == "auto" ]]; then
packages=(meshix-cli-bin tabex-bin)
packages=(tabex-bin)
if [[ -n "${SHPIT_GH_TOKEN:-}" || -z "${GITHUB_ACTIONS:-}" ]]; then
packages+=(osyrra-bin)
fi
elif [[ "$1" == "all" ]]; then
packages=(
meshix-cli-bin
foundry-cli-bin
tabex-bin
osyrra-bin
Expand All @@ -25,13 +24,6 @@ fi

for package in "${packages[@]}"; do
case "${package}" in
meshix-cli-bin)
if [[ "$1" == "auto" ]]; then
"${repo_root}/scripts/update-meshix-cli-bin.sh" --optional
else
"${repo_root}/scripts/update-meshix-cli-bin.sh"
fi
;;
foundry-cli-bin)
if [[ "$1" == "auto" ]]; then
"${repo_root}/scripts/update-foundry-cli-bin.sh" --optional
Expand Down
9 changes: 0 additions & 9 deletions scripts/validate-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@ done
"${repo_root}/scripts/validate-foundry-cli-archive.test.sh"
"${repo_root}/scripts/select-foundry-cli-asset.test.sh"

meshix_pkg="${repo_root}/meshix-cli-bin"
if [[ -f "${meshix_pkg}/PKGBUILD" ]]; then
grep -q "depends=('nodejs')" "${meshix_pkg}/PKGBUILD"
grep -q '_release_version="${pkgver//_/-}"' "${meshix_pkg}/PKGBUILD"
grep -q 'gh release download "meshix-cli-v${_release_version}"' "${meshix_pkg}/PKGBUILD"
grep -q 'install="${pkgname}\.install"' "${meshix_pkg}/PKGBUILD"
grep -q 'meshix-cli-dev' "${meshix_pkg}/meshix-cli-bin.install"
fi

tabex_pkg="${repo_root}/tabex-bin"
if [[ -f "${tabex_pkg}/PKGBUILD" ]]; then
grep -q 'install="${pkgname}\.install"' "${tabex_pkg}/PKGBUILD"
Expand Down
Loading