Set up husky
This commit is contained in:
@@ -50,23 +50,16 @@ jobs:
|
||||
echo "Tag ${{ steps.version.outputs.tag }} does not exist"
|
||||
fi
|
||||
|
||||
- name: Install dependencies and build
|
||||
- name: Verify built files are up to date
|
||||
if: steps.check_tag.outputs.exists == 'false'
|
||||
run: |
|
||||
pnpm install
|
||||
pnpm run build
|
||||
|
||||
- name: Commit built files if changed
|
||||
if: steps.check_tag.outputs.exists == 'false'
|
||||
run: |
|
||||
git config --local user.email "action@github.com"
|
||||
git config --local user.name "GitHub Action"
|
||||
|
||||
# Check if there are any uncommitted changes (built files should already be committed via pre-commit hook)
|
||||
if [[ -n $(git status --porcelain) ]]; then
|
||||
git add dist/
|
||||
git commit -m "chore: rebuild action for v${{ steps.version.outputs.version }}"
|
||||
git push
|
||||
echo "❌ Error: There are uncommitted changes. Built files should be committed via pre-commit hook."
|
||||
git status
|
||||
exit 1
|
||||
fi
|
||||
echo "✅ All built files are up to date"
|
||||
|
||||
- name: Create and push tags
|
||||
if: steps.check_tag.outputs.exists == 'false'
|
||||
|
||||
Reference in New Issue
Block a user