-
Notifications
You must be signed in to change notification settings - Fork 37
55 lines (44 loc) · 1.55 KB
/
build-test.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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
- 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: Create Pull Request
if: steps.check_changes.outputs.changes_detected == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name github-actions
git config user.email [email protected]
# Create a new branch
git checkout -b version-bump-${{ github.sha }}
# Run version bump
npm run version
# Commit changes
git add .
git commit -m "Version bump and changelog update"
# Push the branch
git push origin version-bump-${{ github.sha }}
# Create Pull Request
gh pr create --title "Version Bump and Changelog Update" --body "Automated version bump and changelog update" --base main --head version-bump-${{ github.sha }}
# test-tauri job remains commented out as in the previous version