-
Notifications
You must be signed in to change notification settings - Fork 528
40 lines (34 loc) · 1.25 KB
/
release-templates.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: release-templates
on:
push:
tags:
- 'instantsearch.js@*'
- 'create-instantsearch-app@*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: 📦 install dependencies
run: |
cd packages/create-instantsearch-app
yarn install
- name: 🔧 build templates
run: yarn workspace create-instantsearch-app release-templates
- name: 🚀 push templates
run: |
cd packages/create-instantsearch-app/build
UNCOMMITTED_CHANGES=`git status --porcelain`
if [ ! -z "$UNCOMMITTED_CHANGES" ]; then
git config --global user.name "InstantSearch"
git config --global user.email "[email protected]"
git commit -a -m "feat(template): Update templates"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git push origin templates
echo "✅ Templates have been compiled to the branch templates."
else
echo "ℹ️ No changes made to the templates."
fi