forked from PinSpace-Org/GistPin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversion-bump.yml
More file actions
56 lines (48 loc) 路 1.41 KB
/
Copy pathversion-bump.yml
File metadata and controls
56 lines (48 loc) 路 1.41 KB
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
56
name: Semantic Version Bump
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: write
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Bump version
run: bash infrastructure/scripts/bump-version.sh
- name: Commit version updates
run: |
if git diff --quiet -- '**/package.json'; then
echo "No package.json version changes."
exit 0
fi
git add '**/package.json'
git commit -m "chore(release): bump version"
git push
- name: Create and push tag
run: |
if [ ! -f ".next-version-tag" ]; then
echo "Missing .next-version-tag output."
exit 1
fi
TAG="$(cat .next-version-tag)"
if git rev-parse "${TAG}" >/dev/null 2>&1; then
echo "Tag ${TAG} already exists."
exit 0
fi
git tag "${TAG}"
git push origin "${TAG}"
- name: Trigger release workflow
env:
GH_TOKEN: ${{ github.token }}
run: |
gh workflow run "Semantic Version Bump" || true