From 17d9b450cfb3585d2240c9d983c74278bd2ef791 Mon Sep 17 00:00:00 2001 From: MotherSphere Date: Tue, 24 Nov 2026 17:16:10 +0100 Subject: [PATCH] ci: weekly dependency and release automation dependabot.yml follows templates/dependabot.yml from Project-Colony-Resources main (6e282d2), with the Cargo entry in /src-tauri and an npm entry that keeps the existing typescript and rolldown ignores. release-please now runs with a colony-release-bot token, so its release pull request gets normal CI runs. --- .github/dependabot.yml | 70 ++++++++++++++++++++++++----------- .github/workflows/release.yml | 13 +++++++ 2 files changed, 62 insertions(+), 21 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 984a383..0be72db 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,25 +1,25 @@ -# Keep the supply chain current: GitHub Actions, Cargo and npm dependencies. -# -# From Project-Colony-Resources templates/dependabot.yml, with two changes for -# this repository: the Rust crate lives in src-tauri/, and the Svelte frontend -# adds an npm ecosystem at the root. -# -# Dependabot opening a PR is not the rule being followed, merging it is. See -# design/dependencies.md: everything is on its latest release, always. +# Copy to .github/dependabot.yml. +# Rules: design/dependencies.md "Automatic merges". Add only +# repository-specific ignores, directories or a cargo-dev group. version: 2 updates: - # A stale action is the same problem as a stale crate, with more privileges. - package-ecosystem: github-actions directory: / schedule: interval: weekly - # The shared signing workflow stays at the organisation pin, which moves - # for every program at once: design/releases.md in - # Project-Colony-Resources, "The pin". A Dependabot PR would move one - # repository alone. Dependabot names that dependency after the workflow - # path (Project-Colony/Project-Colony-Resources/.github/workflows/...), so - # the rule needs the trailing wildcard to match it. + day: friday + time: "07:00" + timezone: Europe/Brussels + # GitHub Actions supports default-days only. + cooldown: + default-days: 7 + # chore is a hidden changelog section, so action updates never release. + commit-message: + prefix: chore + include: scope ignore: + # Dependabot names the shared workflows after their path, hence the wildcard. + # The pin moves by hand (design/releases.md "The pin"). - dependency-name: "Project-Colony/Project-Colony-Resources*" groups: actions: @@ -29,24 +29,48 @@ updates: directory: /src-tauri schedule: interval: weekly + day: friday + time: "07:00" + timezone: Europe/Brussels + cooldown: + default-days: 7 + # fix lands under Fixes and cuts a patch release. + commit-message: + prefix: fix + include: scope open-pull-requests-limit: 5 - # Transitive crates too, so the lockfile stays current without a manual - # `cargo update`. allow: - dependency-type: all groups: - # Minor and patch bumps arrive as one PR, so a routine week is one review - # rather than fifteen. Majors stay separate: they deserve their own read. + cargo-security: + applies-to: security-updates + patterns: ["*"] + update-types: ["minor", "patch"] + # Repository-specific: crates listed only under [dev-dependencies]. + # weekly-merge.yml squashes this group as chore(deps), so it never + # releases. List the same names in cargo-minor's exclude-patterns. + # cargo-dev: + # patterns: ["criterion", "tempfile"] + # update-types: ["minor", "patch"] cargo-minor: update-types: ["minor", "patch"] + # exclude-patterns: ["criterion", "tempfile"] - package-ecosystem: npm directory: / schedule: interval: weekly + day: friday + time: "07:00" + timezone: Europe/Brussels + cooldown: + default-days: 7 + # svelte and vite are devDependencies but ship in the frontend bundle, + # so every npm update is a fix. + commit-message: + prefix: fix + include: scope open-pull-requests-limit: 5 - # Transitive packages too: most npm alerts this repository has had came - # from one (postcss, devalue, source-map-js). allow: - dependency-type: all ignore: @@ -62,5 +86,9 @@ updates: - dependency-name: rolldown update-types: ["version-update:semver-major", "version-update:semver-minor"] groups: + npm-security: + applies-to: security-updates + patterns: ["*"] + update-types: ["minor", "patch"] npm-minor: update-types: ["minor", "patch"] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ca8b3f7..a38b153 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -64,10 +64,23 @@ jobs: release_created: ${{ steps.release.outputs.release_created }} tag_name: ${{ steps.release.outputs.tag_name }} steps: + # release-please writes the release pull request with the App token: + # one written with GITHUB_TOKEN gets CI runs that wait for approval. + - name: Get a colony-release-bot token + id: app + uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0 + with: + client-id: ${{ vars.COLONY_BOT_CLIENT_ID }} + private-key: ${{ secrets.COLONY_BOT_PRIVATE_KEY }} + permission-contents: write + permission-pull-requests: write + permission-issues: write + # No `release-type` input: when it is set, the action ignores both files. - uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0 id: release with: + token: ${{ steps.app.outputs.token }} config-file: release-please-config.json manifest-file: .release-please-manifest.json