From 621dbb96cb420bed9421cf5cf075e43f733949b4 Mon Sep 17 00:00:00 2001 From: CokaKoala <31664583+AdrianGonz97@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:50:41 -0400 Subject: [PATCH] chore: add `postpublish` script and manual template updater (#237) --- .github/workflows/update-template-repo.yml | 32 ++++++++++++++++++++++ packages/cli/package.json | 3 +- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/update-template-repo.yml diff --git a/.github/workflows/update-template-repo.yml b/.github/workflows/update-template-repo.yml new file mode 100644 index 00000000..2ff5d33e --- /dev/null +++ b/.github/workflows/update-template-repo.yml @@ -0,0 +1,32 @@ +name: Update Template Repo (manual) + +on: + workflow_dispatch: + +permissions: {} +jobs: + release: + # prevents this action from running on forks + if: github.repository == 'sveltejs/cli' + name: Update template + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18.x + cache: pnpm + + - name: Install + run: pnpm install --frozen-lockfile + + - name: Build + run: pnpm build + + - name: Run template update script + run: pnpm -F @sveltejs/create update-template-repo + env: + UPDATE_TEMPLATE_SSH_KEY: ${{ secrets.UPDATE_TEMPLATE_SSH_KEY }} diff --git a/packages/cli/package.json b/packages/cli/package.json index 70a3ba54..2c87350d 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -13,7 +13,8 @@ "scripts": { "check": "tsc", "format": "pnpm lint --write", - "lint": "prettier --check . --config ../../prettier.config.js --ignore-path ../../.gitignore --ignore-path .gitignore --ignore-path ../../.prettierignore" + "lint": "prettier --check . --config ../../prettier.config.js --ignore-path ../../.gitignore --ignore-path .gitignore --ignore-path ../../.prettierignore", + "postpublish": "pnpm -F @sveltejs/create update-template-repo" }, "files": [ "dist"