Update build-test.yml #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Version Bump | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
version-bump: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Install dependencies | |
run: | | |
npm install | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Actions" | |
if [[ `git status --porcelain` ]]; then | |
git add package-lock.json | |
git commit -m "Update package-lock.json" | |
git push | |
fi | |
- name: Check for changesets | |
id: check_changes | |
run: | | |
if [ -n "$(ls .changeset/*.md 2>/dev/null)" ]; then | |
echo "changes_detected=true" >> $GITHUB_OUTPUT | |
else | |
echo "changes_detected=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Version bump and update changelog | |
if: steps.check_changes.outputs.changes_detected == 'true' | |
run: | | |
npm run version | |
git push --follow-tags | |
# test-tauri job remains commented out as in the previous version |