Skip to content

Commit 4725c05

Browse files
committed
updated GitHub Actions workflow to check starter kit snippets builds
1 parent 0a955a8 commit 4725c05

1 file changed

Lines changed: 17 additions & 10 deletions

File tree

.github/workflows/check-snippets.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,21 @@ jobs:
1919
uses: actions/checkout@v3
2020
with:
2121
fetch-depth: 0
22+
persist-credentials: false
23+
24+
- name: Configure git
25+
run: |
26+
git config --global user.name "github-actions"
27+
git config --global user.email "github-actions@github.com"
28+
29+
- name: Rebase snippets on latest starter-kit
30+
working-directory: ${{ github.workspace }}
31+
run: |
32+
if ! git remote | grep -q '^starter-kit$'; then
33+
git remote add starter-kit https://github.com/proto-kit/starter-kit.git
34+
fi
35+
git fetch starter-kit develop
36+
git subtree pull --prefix=starter-kit-snippets starter-kit develop --squash
2237
2338
- name: Setup Node.js
2439
uses: actions/setup-node@v3
@@ -27,19 +42,11 @@ jobs:
2742

2843
- name: Install pnpm
2944
run: npm install -g pnpm
30-
31-
- name: Rebase snippets on latest starter-kit
32-
working-directory: ${{ github.workspace }}
33-
run: |
34-
cd ../
35-
git remote add starter-kit https://github.com/proto-kit/starter-kit.git
36-
git fetch starter-kit main
37-
git subtree pull --prefix=starter-kit-snippets starter-kit main --squash
38-
45+
3946
- name: Install dependencies
4047
run: pnpm install
4148
working-directory: starter-kit-snippets
4249

4350
- name: Build chain package
44-
run: pnpm build --filter=chain
4551
working-directory: starter-kit-snippets
52+
run: pnpm build --filter=chain

0 commit comments

Comments
 (0)