Skip to content

chore: release (#6022) #44

chore: release (#6022)

chore: release (#6022) #44

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