Skip to content

Commit f732c42

Browse files
committed
fix: bump version to 1.0.7 and automate version bump on release
1 parent 8357194 commit f732c42

3 files changed

Lines changed: 15 additions & 3 deletions

File tree

‎.github/workflows/publish.yml‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'v*.*.*'
77

88
permissions:
9-
contents: read
9+
contents: write
1010
packages: write
1111

1212
jobs:
@@ -23,6 +23,18 @@ jobs:
2323
- name: Set up Docker Buildx
2424
uses: docker/setup-buildx-action@v3
2525

26+
- name: Bump package.json versions
27+
run: |
28+
VERSION="${{ github.ref_name }}"
29+
VERSION="${VERSION#v}"
30+
jq --arg v "$VERSION" '.version = $v' backend/package.json > /tmp/pkg.json && mv /tmp/pkg.json backend/package.json
31+
jq --arg v "$VERSION" '.version = $v' frontend/package.json > /tmp/pkg.json && mv /tmp/pkg.json frontend/package.json
32+
git config user.name "github-actions[bot]"
33+
git config user.email "github-actions[bot]@users.noreply.github.com"
34+
git add backend/package.json frontend/package.json
35+
git diff --cached --quiet || git commit -m "chore: bump version to ${VERSION}"
36+
git push origin HEAD:main
37+
2638
- name: Log in to GHCR
2739
uses: docker/login-action@v3
2840
with:

‎backend/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mailflow-backend",
3-
"version": "1.0.0",
3+
"version": "1.0.7",
44
"type": "module",
55
"scripts": {
66
"start": "node src/index.js",

‎frontend/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mailflow-frontend",
3-
"version": "1.0.0",
3+
"version": "1.0.7",
44
"type": "module",
55
"scripts": {
66
"dev": "vite",

0 commit comments

Comments
 (0)