Skip to content

version-bumps

version-bumps #175

Workflow file for this run

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
schedule:
- cron: '23 6 * * *'
permissions:
contents: write
pull-requests: write
concurrency:
group: version-bumps
cancel-in-progress: false
jobs:
update:
runs-on: ubuntu-latest
container:
image: archlinux:base-devel
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:
- name: Install updater dependencies
run: pacman -Syu --noconfirm git github-cli jq unzip
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Mark workspace as safe
run: git config --global --add safe.directory "${GITHUB_WORKSPACE}"
- name: Configure git identity
run: |
git config user.name "shpit-bot"
git config user.email "opensource@shpit.dev"
- name: Update packages
run: ./scripts/update-packages.sh auto
- name: Detect changes
id: detect
run: |
if git diff --quiet; then
echo 'changed=false' >> "${GITHUB_OUTPUT}"
else
echo 'changed=true' >> "${GITHUB_OUTPUT}"
fi
- name: Commit and push branch
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 commit -m "chore(pkgbuilds): bump package versions"
git push --force --set-upstream origin "${UPDATE_BRANCH}"
- name: Open or update pull request
if: ${{ steps.detect.outputs.changed == 'true' }}
run: |
#!/usr/bin/env bash
set -euo pipefail
pr_number="$(gh pr list \
--head "${UPDATE_BRANCH}" \
--base main \
--json number \
--jq '.[0].number // empty')"
title="chore(pkgbuilds): bump package versions"
body_file="$(mktemp)"
cat <<'EOF' > "${body_file}"
## Summary
- update SHPIT package definitions to the latest discovered upstream versions
- refresh checksums and `.SRCINFO`
- keep the public repo metadata aligned with the package automation flow
EOF
if [[ -n "${pr_number}" ]]; then
gh pr edit "${pr_number}" --title "${title}" --body-file "${body_file}"
else
gh pr create \
--base main \
--head "${UPDATE_BRANCH}" \
--title "${title}" \
--body-file "${body_file}"
fi