Commit Graph
44 Commits
Author SHA1 Message Date
Dylan M. Taylor fc9e47894e ci(sonar): skip SonarCloud scan on fork pull requests (#48)
GitHub does not expose repository secrets (including SONAR_TOKEN) to pull
requests opened from forks. Because the reusable sonarcloud.yml declared
SONAR_TOKEN as a required secret and sonar-scan.yml called it with
`secrets: inherit` on every pull_request, fork PRs failed immediately with:

  Error when evaluating 'secrets' ... Secret SONAR_TOKEN is required, but not
  provided while calling.

This made every fork PR show a failing "SonarCloud Scan" check unrelated to the
PR's contents. (The separate SonarCloud GitHub App check, "SonarCloud Code
Analysis", is unaffected and continues to run.)

Fixes:
- Gate the caller job so it only runs on pushes to main and on same-repo PRs;
  fork PRs now report a neutral skipped status instead of a hard failure.
- Make SONAR_TOKEN optional in the reusable workflow and guard the scan step on
  the token being present, so a missing token never fails the workflow.

Verified with actionlint.
2026-10-21 19:04:08 -04:00
Dylan M. Taylor ec92568a7a ci: exclude infra/glue code from SonarCloud coverage gate
craft-common-actions holds reusable GitHub Actions (YAML), composite actions,
shell, and Python helper/test scripts with no unit-test coverage surface.
Exclude actions/, tests/, .github/, and shell/python from the coverage gate so
the new-code coverage condition doesn't block the project.
2026-10-21 17:44:12 -04:00
Dylan M. Taylor 10bdd0e0e2 ci: re-trigger SonarCloud scan after disabling Automatic Analysis 2026-10-21 17:42:48 -04:00
Dylan M. Taylor cab3588fb6 ci: re-trigger SonarCloud scan 2026-10-21 16:04:50 -04:00
Dylan M. Taylor e245b3d9ea ci: add sonar-project.properties for CI-based analysis
Marks the project ineligible for SonarCloud Automatic Analysis, resolving the
CI-vs-automatic-analysis conflict so the SonarCloud workflow succeeds.
2026-10-21 16:00:24 -04:00
Dylan M. Taylor 7f2a5aabd6 ci: restore reusable SonarCloud workflow; add self-scan caller
Fixes an accidental overwrite where the reusable workflow_call definition was
replaced by a caller stub. The reusable workflow lives at sonarcloud.yml; this
repo's own scan now runs via sonar-scan.yml calling the local reusable workflow.
2026-10-21 15:48:48 -04:00
Dylan M. Taylor b8c9254bfd ci: add SonarCloud scan via shared reusable workflow
Calls storytold/craft-common-actions/.github/workflows/sonarcloud.yml@main
with secrets: inherit. Adds SonarCloud badge to README where missing and
removes the redundant sonar-project.properties (config now passed by the
reusable workflow).
2026-10-21 15:46:48 -04:00
Dylan M. Taylor cc230f9e93 ci: add reusable SonarCloud scan workflow (#43)
Reusable workflow_call entrypoint for SonarCloud analysis across craft repos.
Consumer repos call it via storytold/craft-common-actions/.github/workflows/sonarcloud.yml@main.
Derives project key as storytold_<repo> unless project-key input is provided.
2026-10-21 15:44:53 -04:00
aiongg d664cb69f4 feat(release): default craft-fonts-ref to the suite's craft-fonts pin (#38)
release.yml and freebsd.yml default craft-fonts-ref to craft-fonts main
(bfcbf71: Japanese, Chinese, Arabic, Thai, Georgian), so one bump here
reaches every app's next release; an app sets the input only to pin
another commit. A test checks the two defaults agree and that every
release job that checks out craft-fonts builds with CRAFT_FONTS_REQUIRED=1.

Refs storytold/craft-libs#197
2026-10-21 09:31:29 -04:00
Brandon ThomasandClaude Opus 5.5 39962f26c3 Release: drop FreeBSD aarch64 until it can be built in time (#40)
The emulated aarch64 VM takes over 5 hours for most apps, so the job is
cancelled at the limit. GitHub's ARM64 runners have no KVM, so they do not
help. Releases ship FreeBSD x86_64 only until #39 is fixed.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 08:41:36 -04:00
9824a77554 fix(release): find the Linux tarball by version, not app-name (#37)
#35 matched <app-name>-<version>-linux-<arch>.tar.gz exactly. craft-launcher
passes app-name craft-launcher but ships artcraft-launcher-*, so its 0.6.1
Arch and Flatpak jobs found nothing. Match *-<version>-linux-<arch>.tar.gz,
skip -cli- and -server- companion tarballs, and require exactly one.

Co-authored-by: Brandon Thomas <brandon@storyteller.ai>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 03:42:19 -04:00
Brandon ThomasandClaude Opus 5.5 d18075e30c Skip CodeRabbit reviews on Dependabot PRs (#36)
Adds .coderabbit.yaml so CodeRabbit no longer reviews or comments on PRs opened by dependabot[bot].

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 11:42:28 -04:00
fd68caa519 fix(release): pick the app's own Linux tarball by exact name (#35)
* fix(release): pick the app's own Linux tarball by exact name

The Arch and Flatpak jobs globbed *-linux-<arch>.tar.gz. PDFCraft also ships
pdfcraft-cli-<ver>-linux-<arch>.tar.gz, so Arch saw two tarballs and failed,
and Flatpak aarch64 took the CLI tarball (no bin/pdfcraft). Select
<app-name>-<version>-linux-<arch>.tar.gz instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(release): pass tarball name parts through step env

Review (CodeRabbit, CWE-78): app-name is a free-form reusable-workflow
input, and interpolating it into run: puts caller text into the shell
source. The Flatpak and Arch steps now read APP_NAME, RELEASE_VERSION
and ARCH from env.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Brandon Thomas <brandon@storyteller.ai>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 11:15:03 -04:00
Torben d7bf8f06e1 Create dependabot.yml (#30)
copied from https://github.com/storytold/photocraft/blob/main/.github/dependabot.yml
2026-10-19 01:14:25 -04:00
skylar taylor-barrick c6f87c1cc0 Merge pull request #32 from storytold/codex/freebsd-ci-cargo-cache
ci(freebsd): keep ARM coverage outside default PR checks and cache Cargo builds
2026-10-18 22:48:01 -06:00
skylar taylor-barrick f49277a3d0 fix(ci): let GitHub manage FreeBSD cache storage limits 2026-10-18 22:46:35 -06:00
skylar taylor-barrick 2f3b0f5e83 test(ci): make empty-profile regression independent of filesystem 2026-10-18 22:07:57 -06:00
skylar taylor-barrick c347980c9f fix(ci): retain untouched profiles and isolate workflow fixtures 2026-10-18 22:01:49 -06:00
skylar taylor-barrick f3d700ca15 fix(ci): support FreeBSD login shells and prioritize artifact delivery 2026-10-18 21:45:22 -06:00
skylar taylor-barrick 0efb69ba2a fix(ci): preserve bounded caches and tolerate absent Cargo sources 2026-10-18 21:30:50 -06:00
skylar taylor-barrick 69e4aa9c2c fix(ci): bound FreeBSD caches and recover from cache failures 2026-10-18 21:25:32 -06:00
skylar taylor-barrick 0156a114e8 fix(freebsd): keep cache-save failures from blocking package delivery 2026-10-18 19:10:19 -06:00
skylar taylor-barrick adcd8bf032 ci(freebsd): keep ARM coverage outside default PR checks and cache Cargo builds 2026-10-18 18:59:20 -06:00
Dylan M. Taylor 7fe542f0e5 fix(arch-package): use [[ for test constructs and merge nested conditionals (#25) 2026-10-18 14:44:20 -04:00
Dylan M. Taylor c89691d3c0 security(ci): restrict top-level workflow permissions to read-only in release.yml (#27) 2026-10-18 14:43:57 -04:00
Dylan M. Taylor 98a5a2f7e7 security(actions): enforce HTTPS on curl redirects and repository URLs (#26) 2026-10-18 14:43:01 -04:00
lukasholdandClaude Opus 5.5 1f5d516959 fix(freebsd): install Rust from packages on aarch64 (#24)
aarch64-unknown-freebsd is a tier-3 Rust target, so rustup publishes no
toolchain for it: since the multiarch matrix (#17), every FreeBSD aarch64
job stopped in `prepare` with "installer for platform
'aarch64-unknown-freebsd' not found". The aarch64 leg now installs
FreeBSD's lang/rust package (1.98.1 on FreeBSD 15) and x86_64 keeps
rustup; `$HOME/.cargo/env`, which only rustup writes, is sourced only
when present. Applied to both freebsd.yml and release.yml.

Tests check that each architecture picks its installer and that the run
step works without a rustup environment; both fail on the previous
workflows.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 13:15:23 -04:00
ihsan mokhlisse 58076cf0ff docs: correct the release FreeBSD job limit (#22)
The release job timeout is 300 minutes so aarch64 can run under QEMU.
The limits table still listed the previous 180 minute value.
2026-10-18 07:57:19 -04:00
Dylan M. Taylor bb838fd857 feat(freebsd): add matrix strategy for multiarch support (x86_64 and aarch64) (#17) 2026-10-18 00:39:48 -04:00
Dylan M. Taylor 31e08e5e14 feat(release): build Arch Linux package (.pkg.tar.zst) natively via makepkg from release tarball (#16)
* feat(release): build Arch Linux package (.pkg.tar.zst) via makepkg from release tarball

* fix(arch-package): fix PKGBUILD provides quotes, add podman fallback and e2e test
2026-10-18 00:37:20 -04:00
Dylan M. Taylor 43f4e83c68 feat(ci): add shared nix workflow and update actions to latest versions
- Add reusable .github/workflows/nix.yml workflow using Determinate Nix Installer v23 (Node 24 native)
- Update dtolnay/rust-toolchain commit pin to latest v1 tag (683b588)
- Bump nfpm to 2.48.0 with verified amd64/arm64 checksums
- Document nix.yml reusable workflow in README.md
2026-10-15 23:28:54 -04:00
skylar taylor-barrick 14bce6248a Merge pull request #11 from storytold/ci/bounded-shared-workflows
ci: bound shared jobs and preserve caller validation
2026-10-15 21:23:50 -06:00
skylartaylor e10d698d5c ci: bound shared jobs and preserve caller validation 2026-10-16 04:55:29 +02:00
Dylan M. Taylorandkulveersingh 306f1b65db feat(release): opt-in craft-fonts for the web build (#4)
The desktop release jobs check out storytold/craft-fonts at craft-fonts-ref and build with CRAFT_FONTS_DIR. The web job never did, so an app's web build could not embed any of its fonts.

This adds a boolean input, web-craft-fonts, defaulting to false. When it's true and craft-fonts-ref is set, the web job checks out craft-fonts and runs packaging/web/package.sh with CRAFT_FONTS_DIR and CRAFT_FONTS_REQUIRED=1.

Co-authored-by: kulveersingh <kulveer.singh@gmail.com>
2026-10-15 20:02:35 -04:00
Dylan M. Taylor a7fe8f0823 feat(ci): add FigCraft support, optional server build, and FreeBSD workflow extensibility (#9) 2026-10-15 19:45:59 -04:00
Brandon ThomasandClaude Opus 5.5 f0808a5ccb fix(ci): install ALSA headers for Linux and riscv64 builds (#5)
SoundCraft links ALSA through cpal; its pre-shared-workflow release.yml
installed libasound2-dev (and :riscv64). Without them the Linux x86_64,
aarch64 and riscv64 release jobs fail with "unable to find library
-lasound". Apps that don't use ALSA don't link it.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 11:09:44 -04:00
Brandon ThomasandClaude Opus 5.5 024b7aa57d fix(ci): require signing secrets on release, pass riscv64 formats with spaces (#3)
- macOS and Windows jobs fail on refs/heads/release when their signing secrets
  are empty, instead of letting the app's packaging warn and ship unsigned.
  A caller that doesn't list a secret name gets it empty, even though the value
  is in its release environment: craft-launcher 0.3.1 built unsigned Windows
  MSIs this way.
- linux-riscv64 calls package.sh --formats "deb rpm tar". Every app's
  package.sh splits formats on spaces, so deb,rpm,tar matched nothing and the
  job failed with an empty dist/release.
- README caller example lists the secrets instead of secrets: inherit.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 11:07:38 -04:00
Dylan M. Taylor 62e4e147b3 feat(ci): bump FreeBSD release to 15.1-STABLE (#2) 2026-10-11 14:47:05 -04:00
Brandon ThomasandClaude Opus 5.5 8f081ff5db fix(ci): pass toolchain explicitly to SHA-pinned dtolnay/rust-toolchain (#1)
dtolnay/rust-toolchain derives the toolchain from the ref it is called at
(@stable, @1.90). Pinned to a commit SHA, that ref carries no toolchain, so
the action fails with "'toolchain' is a required input". This broke the
Windows ARM64 workflow on every craft app's main (e.g. storytold/wordcraft
run on 860f4ca) and would break the macOS, Windows, Linux, web and riscv64
release jobs the same way. Pass toolchain: stable at every call site.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 12:41:17 -04:00
Dylan M. Taylor 27a978f0ac chore: migrate repository references to storytold/craft-common-actions v1 v1.0.0 2026-10-11 11:33:27 -04:00
Dylan M. Taylor d8fa439ab1 chore: pin external actions to full commit SHAs and upgrade to Node 24 actions 2026-10-11 09:12:53 -04:00
Dylan M. Taylor 7b894179d0 feat(ci): add SHA256-verified nfpm and enable deb/rpm packages for linux-riscv64 2026-10-11 08:19:53 -04:00
Dylan M. Taylor d6cfd5aba5 fix(ci): robustify draft release conditions, freebsd bash dependency, and wxs guid lint 2026-10-11 08:00:14 -04:00
Dylan M. Taylor b5b90efb3b Initial commit: Reusable workflows and composite actions for ArtCraft apps 2026-10-11 07:51:06 -04:00