Skip to content

Commit 621dbb9

Browse files
authored
chore: add postpublish script and manual template updater (#237)
1 parent 67c8c86 commit 621dbb9

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Update Template Repo (manual)
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions: {}
7+
jobs:
8+
release:
9+
# prevents this action from running on forks
10+
if: github.repository == 'sveltejs/cli'
11+
name: Update template
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Repo
15+
uses: actions/checkout@v4
16+
- uses: pnpm/action-setup@v4
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 18.x
21+
cache: pnpm
22+
23+
- name: Install
24+
run: pnpm install --frozen-lockfile
25+
26+
- name: Build
27+
run: pnpm build
28+
29+
- name: Run template update script
30+
run: pnpm -F @sveltejs/create update-template-repo
31+
env:
32+
UPDATE_TEMPLATE_SSH_KEY: ${{ secrets.UPDATE_TEMPLATE_SSH_KEY }}

packages/cli/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"scripts": {
1414
"check": "tsc",
1515
"format": "pnpm lint --write",
16-
"lint": "prettier --check . --config ../../prettier.config.js --ignore-path ../../.gitignore --ignore-path .gitignore --ignore-path ../../.prettierignore"
16+
"lint": "prettier --check . --config ../../prettier.config.js --ignore-path ../../.gitignore --ignore-path .gitignore --ignore-path ../../.prettierignore",
17+
"postpublish": "pnpm -F @sveltejs/create update-template-repo"
1718
},
1819
"files": [
1920
"dist"

0 commit comments

Comments
 (0)