.github/workflows/release.yml built and published the bakery binary itself, but it lived under .github/ and targeted runs-on: [self-hosted, hestia] — a runner label only registered against Forgejo, never against GitHub Actions. It has therefore never run; get.sh has been pointing at dl.breadway.dev/bakery/... this whole time with nothing actually publishing there. Recreated the same logic as .forgejo/workflows/release-bakery.yml, matching the sibling release-bread-theme.yml in this repo (manual clone instead of actions/checkout, GH_RELEASE_TOKEN instead of the GitHub-provided GITHUB_TOKEN, same dormant-until-provisioned minisign signing step). Removed the dead .github copy.
74 lines
2.9 KiB
YAML
74 lines
2.9 KiB
YAML
name: release bakery
|
|
|
|
on:
|
|
push:
|
|
tags: ['v*']
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: [self-hosted, hestia]
|
|
steps:
|
|
- name: checkout
|
|
run: |
|
|
set -euo pipefail
|
|
rm -rf src && mkdir src
|
|
git clone --branch "${GITHUB_REF_NAME}" --depth 1 \
|
|
"https://git.breadway.dev/${GITHUB_REPOSITORY}.git" src
|
|
|
|
- name: build
|
|
run: cd src && cargo build --release --locked -p bakery
|
|
|
|
- name: test
|
|
run: cd src && cargo test --release --locked -p bakery
|
|
|
|
- name: prepare artifacts
|
|
run: |
|
|
set -euo pipefail
|
|
VERSION="${GITHUB_REF_NAME#v}"
|
|
PKG_DIR="/srv/breadway-dl/bakery/${VERSION}"
|
|
mkdir -p "${PKG_DIR}"
|
|
cp "src/target/release/bakery" "${PKG_DIR}/bakery-x86_64"
|
|
strip "${PKG_DIR}/bakery-x86_64"
|
|
sha256sum "${PKG_DIR}/bakery-x86_64" | awk '{print $1}' \
|
|
> "${PKG_DIR}/bakery-x86_64.sha256"
|
|
cp src/bakery.toml "${PKG_DIR}/bakery.toml"
|
|
ln -sfn "${VERSION}" "/srv/breadway-dl/bakery/latest"
|
|
|
|
# Signs the bakery binary itself with the shared bakery ecosystem signing
|
|
# key (same key that signs index.json and bread-theme — see
|
|
# release-bread-theme.yml). BAKERY_MINISIGN_SEC_KEY_PATH is a *path on
|
|
# this runner's disk* (hestia has persistent storage), not the key
|
|
# contents. Dormant (binary ships unsigned, as today) until that secret
|
|
# is provisioned.
|
|
- name: sign release binary
|
|
env:
|
|
MINISIGN_SEC_KEY: ${{ secrets.BAKERY_MINISIGN_SEC_KEY_PATH }}
|
|
run: |
|
|
set -euo pipefail
|
|
VERSION="${GITHUB_REF_NAME#v}"
|
|
PKG_DIR="/srv/breadway-dl/bakery/${VERSION}"
|
|
if [ -n "${MINISIGN_SEC_KEY:-}" ]; then
|
|
minisign -W -S -s "${MINISIGN_SEC_KEY}" -m "${PKG_DIR}/bakery-x86_64" \
|
|
-x "${PKG_DIR}/bakery-x86_64.minisig" </dev/null
|
|
echo "signed bakery-x86_64"
|
|
else
|
|
echo "::warning::BAKERY_MINISIGN_SEC_KEY_PATH not set — shipping bakery-x86_64 UNSIGNED"
|
|
fi
|
|
|
|
- name: regenerate index.json
|
|
env:
|
|
MINISIGN_SEC_KEY: ${{ secrets.BAKERY_MINISIGN_SEC_KEY_PATH }}
|
|
run: cd src && bash scripts/gen-index.sh
|
|
|
|
- name: upload to GitHub Release
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }}
|
|
run: |
|
|
set -euo pipefail
|
|
VERSION="${GITHUB_REF_NAME#v}"
|
|
PKG_DIR="/srv/breadway-dl/bakery/${VERSION}"
|
|
gh release create "${GITHUB_REF_NAME}" --repo Breadway/bread-ecosystem \
|
|
--title "bakery ${GITHUB_REF_NAME}" --generate-notes 2>/dev/null || true
|
|
ASSETS="${PKG_DIR}/bakery-x86_64 ${PKG_DIR}/bakery-x86_64.sha256"
|
|
[ -f "${PKG_DIR}/bakery-x86_64.minisig" ] && ASSETS="${ASSETS} ${PKG_DIR}/bakery-x86_64.minisig"
|
|
gh release upload "${GITHUB_REF_NAME}" --repo Breadway/bread-ecosystem ${ASSETS} --clobber
|