Skip to content

Commit 186659b

Browse files
author
Mohammod Al Amin Ashik
committed
chore: switch from release-plz to release-please for desktop app releases
1 parent 2c2a34c commit 186659b

6 files changed

Lines changed: 63 additions & 214 deletions

File tree

.github/workflows/release.yml

Lines changed: 17 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -14,75 +14,32 @@ env:
1414

1515
jobs:
1616
# ─────────────────────────────────────────────────────────────
17-
# Release PR: Create/update release PR with version bump
17+
# Release Please: Create/update release PR with version bump
1818
# ─────────────────────────────────────────────────────────────
19-
release-pr:
19+
release-please:
2020
runs-on: ubuntu-latest
2121
permissions:
2222
contents: write
2323
pull-requests: write
24-
steps:
25-
- uses: actions/checkout@v4
26-
with:
27-
fetch-depth: 0
28-
persist-credentials: false
29-
30-
- uses: dtolnay/rust-toolchain@stable
31-
32-
- name: Create/Update Release PR
33-
uses: release-plz/action@v0.5
34-
with:
35-
command: release-pr
36-
env:
37-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38-
39-
# ─────────────────────────────────────────────────────────────
40-
# Release: Create git tag and GitHub release when PR is merged
41-
# ─────────────────────────────────────────────────────────────
42-
release:
43-
runs-on: ubuntu-latest
44-
permissions:
45-
contents: write
4624
outputs:
47-
releases_created: ${{ steps.release-plz.outputs.releases_created }}
48-
version: ${{ steps.get-version.outputs.version }}
49-
tag: ${{ steps.get-version.outputs.tag }}
25+
release_created: ${{ steps.release.outputs.release_created }}
26+
tag_name: ${{ steps.release.outputs.tag_name }}
27+
version: ${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}
5028
steps:
51-
- uses: actions/checkout@v4
29+
- uses: googleapis/release-please-action@v4
30+
id: release
5231
with:
53-
fetch-depth: 0
54-
persist-credentials: false
55-
56-
- uses: dtolnay/rust-toolchain@stable
57-
58-
- name: Create Release
59-
id: release-plz
60-
uses: release-plz/action@v0.5
61-
with:
62-
command: release
63-
env:
64-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65-
66-
- name: Extract version from releases output
67-
id: get-version
68-
if: steps.release-plz.outputs.releases_created == 'true'
69-
env:
70-
RELEASES: ${{ steps.release-plz.outputs.releases }}
71-
run: |
72-
# Parse the releases JSON to get tag and version
73-
# Example: [{"package_name":"mcpmux","tag":"v0.1.0","version":"0.1.0"}]
74-
TAG=$(echo "$RELEASES" | jq -r '.[0].tag')
75-
VERSION=$(echo "$RELEASES" | jq -r '.[0].version')
76-
echo "tag=$TAG" >> $GITHUB_OUTPUT
77-
echo "version=$VERSION" >> $GITHUB_OUTPUT
78-
echo "Released tag: $TAG, version: $VERSION"
32+
# Use manifest mode for Rust project
33+
manifest-file: .release-please-manifest.json
34+
config-file: release-please-config.json
7935

8036
# ─────────────────────────────────────────────────────────────
8137
# Build Release: Build Tauri app when release is created
8238
# ─────────────────────────────────────────────────────────────
8339
build-release:
84-
needs: release
85-
if: needs.release.outputs.releases_created == 'true'
40+
needs: release-please
41+
if: needs.release-please.outputs.release_created == 'true'
42+
8643
strategy:
8744
fail-fast: false
8845
matrix:
@@ -166,10 +123,10 @@ jobs:
166123
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
167124
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
168125
with:
169-
# Use tagName to find and upload to the existing release created by release-plz
170-
tagName: ${{ needs.release.outputs.tag }}
171-
releaseName: 'McpMux v${{ needs.release.outputs.version }}'
172-
releaseBody: '' # Release notes already created by release-plz
126+
# Use tagName to find and upload to the existing release created by release-please
127+
tagName: ${{ needs.release-please.outputs.tag_name }}
128+
releaseName: 'McpMux v${{ needs.release-please.outputs.version }}'
129+
releaseBody: '' # Release notes already created by release-please
173130
releaseDraft: false
174131
prerelease: false
175132
updaterJsonKeepUniversal: true

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.0.1"
3+
}

CHANGELOG.md

Lines changed: 0 additions & 40 deletions
This file was deleted.

apps/desktop/CHANGELOG.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

release-please-config.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"packages": {
4+
".": {
5+
"release-type": "rust",
6+
"component": "mcpmux",
7+
"changelog-path": "apps/desktop/CHANGELOG.md",
8+
"bump-minor-pre-major": true,
9+
"bump-patch-for-minor-pre-major": true,
10+
"draft": false,
11+
"prerelease": false,
12+
"extra-files": [
13+
{
14+
"type": "toml",
15+
"path": "apps/desktop/src-tauri/Cargo.toml",
16+
"jsonpath": "$.package.version"
17+
},
18+
{
19+
"type": "toml",
20+
"path": "Cargo.toml",
21+
"jsonpath": "$.workspace.package.version"
22+
},
23+
{
24+
"type": "json",
25+
"path": "apps/desktop/src-tauri/tauri.conf.json",
26+
"jsonpath": "$.version"
27+
}
28+
],
29+
"changelog-sections": [
30+
{ "type": "feat", "section": "Features" },
31+
{ "type": "fix", "section": "Bug Fixes" },
32+
{ "type": "perf", "section": "Performance" },
33+
{ "type": "refactor", "section": "Refactoring" },
34+
{ "type": "docs", "section": "Documentation" },
35+
{ "type": "chore", "section": "Chores", "hidden": true },
36+
{ "type": "style", "section": "Styling", "hidden": true },
37+
{ "type": "test", "section": "Testing", "hidden": true },
38+
{ "type": "ci", "section": "CI/CD", "hidden": true },
39+
{ "type": "build", "section": "Build", "hidden": true }
40+
]
41+
}
42+
}
43+
}

release-plz.toml

Lines changed: 0 additions & 97 deletions
This file was deleted.

0 commit comments

Comments
 (0)