From 632fbe9cb1569c0936cb0deebeee3b19e4de3655 Mon Sep 17 00:00:00 2001 From: Errilaz Date: Sun, 3 May 2026 14:12:41 +0200 Subject: [PATCH] separate release and mirror --- actions/release/action.yml | 1 + .../.forgejo/workflows/mirror.yml | 0 .../{tools-mirror => mirror}/.mirrorignore | 0 templates/monorepo-root/package.json | 2 +- .../release/.forgejo/workflows/checks.yml | 27 +++++++++++++++++++ .../package.json | 0 .../release.config.cjs | 0 templates/repo/.regime-template.json | 2 -- .../.forgejo/workflows/checks.yml | 14 ---------- templates/tools-commitlint/.husky/commit-msg | 1 + 10 files changed, 30 insertions(+), 17 deletions(-) rename templates/{tools-mirror => mirror}/.forgejo/workflows/mirror.yml (100%) rename templates/{tools-mirror => mirror}/.mirrorignore (100%) create mode 100644 templates/release/.forgejo/workflows/checks.yml rename templates/{tools-semantic-release => release}/package.json (100%) rename templates/{tools-semantic-release => release}/release.config.cjs (100%) create mode 100644 templates/tools-commitlint/.husky/commit-msg diff --git a/actions/release/action.yml b/actions/release/action.yml index 5bd065a..dd33343 100644 --- a/actions/release/action.yml +++ b/actions/release/action.yml @@ -40,6 +40,7 @@ runs: GITEA_URL: ${{ inputs.gitea-url }} NPM_TOKEN: ${{ inputs.npm-token }} run: | + # TODO: use bun if node -e "const p=require('./package.json'); process.exit(p.workspaces ? 0 : 1)"; then bunx multi-semantic-release else diff --git a/templates/tools-mirror/.forgejo/workflows/mirror.yml b/templates/mirror/.forgejo/workflows/mirror.yml similarity index 100% rename from templates/tools-mirror/.forgejo/workflows/mirror.yml rename to templates/mirror/.forgejo/workflows/mirror.yml diff --git a/templates/tools-mirror/.mirrorignore b/templates/mirror/.mirrorignore similarity index 100% rename from templates/tools-mirror/.mirrorignore rename to templates/mirror/.mirrorignore diff --git a/templates/monorepo-root/package.json b/templates/monorepo-root/package.json index f8330bd..f431604 100644 --- a/templates/monorepo-root/package.json +++ b/templates/monorepo-root/package.json @@ -1,7 +1,7 @@ { "workspaces": { "catalog": { - "@types/bun": "1.3.11" + "@types/bun": "1.3.12" } }, "scripts": { diff --git a/templates/release/.forgejo/workflows/checks.yml b/templates/release/.forgejo/workflows/checks.yml new file mode 100644 index 0000000..cdd66d8 --- /dev/null +++ b/templates/release/.forgejo/workflows/checks.yml @@ -0,0 +1,27 @@ +name: Checks + +on: + push: + branches: ["*"] + pull_request: + +jobs: + checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: https://${{ secrets.FORGE_TOKEN }}@code.quickbasic.org/sigitex/regime/actions/checks@main + + release: + runs-on: ubuntu-latest + needs: checks + if: github.ref == 'refs/heads/main' && github.event_name == 'push' + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: https://${{ secrets.FORGE_TOKEN }}@code.quickbasic.org/sigitex/regime/actions/release@main + with: + gitea-token: ${{ secrets.FORGE_TOKEN }} + gitea-url: https://code.quickbasic.org + npm-token: ${{ secrets.NPM_TOKEN }} diff --git a/templates/tools-semantic-release/package.json b/templates/release/package.json similarity index 100% rename from templates/tools-semantic-release/package.json rename to templates/release/package.json diff --git a/templates/tools-semantic-release/release.config.cjs b/templates/release/release.config.cjs similarity index 100% rename from templates/tools-semantic-release/release.config.cjs rename to templates/release/release.config.cjs diff --git a/templates/repo/.regime-template.json b/templates/repo/.regime-template.json index fa4c69d..a94a2c5 100644 --- a/templates/repo/.regime-template.json +++ b/templates/repo/.regime-template.json @@ -1,9 +1,7 @@ { "inherits": [ "tools-oxc", - "tools-mirror", "tools-commitlint", - "tools-semantic-release", "tools-checks" ] } \ No newline at end of file diff --git a/templates/tools-checks/.forgejo/workflows/checks.yml b/templates/tools-checks/.forgejo/workflows/checks.yml index cdd66d8..3d72890 100644 --- a/templates/tools-checks/.forgejo/workflows/checks.yml +++ b/templates/tools-checks/.forgejo/workflows/checks.yml @@ -11,17 +11,3 @@ jobs: steps: - uses: actions/checkout@v4 - uses: https://${{ secrets.FORGE_TOKEN }}@code.quickbasic.org/sigitex/regime/actions/checks@main - - release: - runs-on: ubuntu-latest - needs: checks - if: github.ref == 'refs/heads/main' && github.event_name == 'push' - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: https://${{ secrets.FORGE_TOKEN }}@code.quickbasic.org/sigitex/regime/actions/release@main - with: - gitea-token: ${{ secrets.FORGE_TOKEN }} - gitea-url: https://code.quickbasic.org - npm-token: ${{ secrets.NPM_TOKEN }} diff --git a/templates/tools-commitlint/.husky/commit-msg b/templates/tools-commitlint/.husky/commit-msg new file mode 100644 index 0000000..6e379e0 --- /dev/null +++ b/templates/tools-commitlint/.husky/commit-msg @@ -0,0 +1 @@ +bunx --no-install -- commitlint --edit $1