4 Commits

Author SHA1 Message Date
ml 2117043e31 More robust nibtools build
release / build (push) Failing after 2m7s
2026-07-02 14:27:55 +02:00
ml 84c47136df Setting bash as default shell for action
release / build (push) Failing after 2m3s
2026-07-02 14:13:37 +02:00
ml 23ad9ebc32 Adding container registry login for gitea action
release / build (push) Failing after 52s
2026-07-02 13:57:35 +02:00
ml f3f7442849 dist.sh builds versioned, signed artifacts for both apps from a git tag
release / build (push) Failing after 0s
(semver drives Android versionCode/versionName and package.json). The
build-image/ Dockerfile pins the same toolchain for a portable,
containerized Gitea Actions runner (build-image.sh builds and pushes
it) so releases don't depend on any one machine's local setup.
Pushing vX.Y.Z now builds and publishes a Gitea Release automatically.
2026-07-02 13:19:12 +02:00
4 changed files with 31 additions and 9 deletions
+14 -2
View File
@@ -13,13 +13,25 @@ jobs:
# regardless of this instance's default Actions permission mode. # regardless of this instance's default Actions permission mode.
permissions: permissions:
contents: write contents: write
# Must match the label your self-hosted act_runner registers with. # Runner defaults `run:` steps to `sh`, which doesn't understand
runs-on: self-hosted # `set -o pipefail` used below — force bash explicitly.
defaults:
run:
shell: bash
# Must match a label your act_runner is registered with. The runner's
# own default label-image is irrelevant here since `container:` below
# overrides the actual build image per-job.
runs-on: ubuntu-latest
container: container:
# :latest — always the most recently pushed build-image.sh output. # :latest — always the most recently pushed build-image.sh output.
# Pin to a specific tag here (see build-image/VERSION) if you need a # Pin to a specific tag here (see build-image/VERSION) if you need a
# release build to be reproducible against an exact toolchain image. # release build to be reproducible against an exact toolchain image.
image: cr.ladkau.de/schwert-und-magie/builder:latest image: cr.ladkau.de/schwert-und-magie/builder:latest
# Lets the runner pull a private image without a manual `docker login`
# on the runner host — see docs/publish.md §4.3.
credentials:
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
+1
View File
@@ -159,6 +159,7 @@ publishes a Gitea Release with the versioned artifacts attached — see
|---|---| |---|---|
| `RELEASE_KEYSTORE_B64` | `base64 -w0 SchwertUndMagieOnPebbleCompanionApp/release.keystore` | | `RELEASE_KEYSTORE_B64` | `base64 -w0 SchwertUndMagieOnPebbleCompanionApp/release.keystore` |
| `RELEASE_KEYSTORE_PROPERTIES` | full contents of `SchwertUndMagieOnPebbleCompanionApp/keystore.properties` | | `RELEASE_KEYSTORE_PROPERTIES` | full contents of `SchwertUndMagieOnPebbleCompanionApp/keystore.properties` |
| `REGISTRY_USER` / `REGISTRY_PASSWORD` | same as in `registry.env`, so the runner can pull the private build image |
`GITEA_TOKEN` is injected automatically per job — nothing to add for it. `GITEA_TOKEN` is injected automatically per job — nothing to add for it.
4. `git tag v1.2.3 && git push origin v1.2.3`. 4. `git tag v1.2.3 && git push origin v1.2.3`.
@@ -42,7 +42,11 @@ fi
if [ ! -d "${SRC}" ]; then if [ ! -d "${SRC}" ]; then
echo "Unpacking nibtools..." echo "Unpacking nibtools..."
tar -xzf "${TARBALL}" -C "${SCRIPT_DIR}" tar -xzf "${TARBALL}" -C "${SCRIPT_DIR}"
mv "${SCRIPT_DIR}"/nibtools-*/ "${SRC}" # Hardcoded, not a glob: on a non-ephemeral runner workspace, a
# nibtools-*/ glob can also match SRC itself once it exists, or other
# stray nibtools-prefixed leftovers, and mv then fails with "target is
# not a directory" (multiple sources, no existing target dir).
mv "${SCRIPT_DIR}/nibtools-91344e0ee3" "${SRC}"
echo "Unpacked to ${SRC}" echo "Unpacked to ${SRC}"
fi fi
+11 -6
View File
@@ -285,18 +285,21 @@ line in `.gitea/workflows/release.yml` to the versioned tag instead.
# https://gitea.com/gitea/act_runner — grab the latest release binary # https://gitea.com/gitea/act_runner — grab the latest release binary
./act_runner register --no-interactive \ ./act_runner register --no-interactive \
--instance <your gitea URL> --token <token> \ --instance <your gitea URL> --token <token> \
--name <runner-name> --labels self-hosted:docker://node:20-bookworm --name <runner-name> --labels ubuntu-latest:docker://node:20-bookworm
./act_runner daemon ./act_runner daemon
``` ```
The image after `docker://` in `--labels` is only a fallback for jobs that The image after `docker://` in `--labels` is only a fallback for jobs that
don't specify their own `container:` — irrelevant here since don't specify their own `container:` — irrelevant here since
`.gitea/workflows/release.yml` always pins its own image, but the runner `.gitea/workflows/release.yml` always pins its own image, but the runner
still needs a Docker-executor label registered to use that executor at still needs a Docker-executor label registered to use that executor at
all. The label name itself (`self-hosted`) must match `runs-on:` in all. The label name itself (`ubuntu-latest` above) must match `runs-on:`
`.gitea/workflows/release.yml` — edit both together if you rename it. in `.gitea/workflows/release.yml` — edit both together if you rename it,
4. The runner's Docker daemon needs pull access to the registry — run or reuse a label an existing runner already advertises (check Site Admin →
`docker login <registry>` once on that machine with the same credentials Actions → Runners) to skip registering a new one entirely.
as `registry.env`.
No manual `docker login` needed on the runner host — the workflow's
`container:` block authenticates the image pull itself via the
`REGISTRY_USER`/`REGISTRY_PASSWORD` secrets (§4.3).
### 4.3 Repo secrets ### 4.3 Repo secrets
@@ -306,6 +309,8 @@ Settings → Actions → Secrets, add:
|---|---| |---|---|
| `RELEASE_KEYSTORE_B64` | `base64 -w0 SchwertUndMagieOnPebbleCompanionApp/release.keystore` | | `RELEASE_KEYSTORE_B64` | `base64 -w0 SchwertUndMagieOnPebbleCompanionApp/release.keystore` |
| `RELEASE_KEYSTORE_PROPERTIES` | the full contents of `SchwertUndMagieOnPebbleCompanionApp/keystore.properties` (§2.2) | | `RELEASE_KEYSTORE_PROPERTIES` | the full contents of `SchwertUndMagieOnPebbleCompanionApp/keystore.properties` (§2.2) |
| `REGISTRY_USER` | same as `REGISTRY_USER` in `registry.env` |
| `REGISTRY_PASSWORD` | same as `REGISTRY_PASSWORD` in `registry.env` |
`secrets.GITEA_TOKEN` (used to create the release and upload assets) is `secrets.GITEA_TOKEN` (used to create the release and upload assets) is
Gitea's own auto-generated per-job token — nothing to create or add yourself. Gitea's own auto-generated per-job token — nothing to create or add yourself.