Skip to content

Commit

Permalink
chore: add postpublish script and manual template updater (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianGonz97 authored Oct 28, 2024
1 parent 67c8c86 commit 621dbb9
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/update-template-repo.yml
Original file line number Diff line number Diff line change
@@ -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 }}
3 changes: 2 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 621dbb9

Please sign in to comment.