Skip to content

chore: bump version to 0.5.0 #59

chore: bump version to 0.5.0

chore: bump version to 0.5.0 #59

Workflow file for this run

name: Release Desktop App
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
jobs:
create-release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
outputs:
release-id: ${{ steps.create.outputs.id }}
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Create Release with auto-generated notes
id: create
uses: actions/github-script@v8
with:
script: |
const { data: release } = await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: context.ref.replace('refs/tags/', ''),
name: `Mermaid Code ${context.ref.replace('refs/tags/', '')}`,
draft: true,
generate_release_notes: true,
});
core.setOutput('id', release.id);
build:
needs: create-release
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
target: x86_64-apple-darwin
args: --target x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
args: --target aarch64-apple-darwin
- os: windows-latest
target: x86_64-pc-windows-msvc
args: --target x86_64-pc-windows-msvc
- os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
args: --target x86_64-unknown-linux-gnu --bundles deb,rpm
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install Linux dependencies
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf libxdo-dev libssl-dev libgtk-3-dev pkg-config libfuse2 squashfs-tools
- run: pnpm install
- name: Build MCP server binary
shell: bash
run: |
curl -fsSL https://bun.sh/install | bash
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
cd mcp-server && bun install
TARGET="${{ matrix.target }}"
mkdir -p ../src-tauri/binaries
if [[ "$TARGET" == "x86_64-apple-darwin" ]]; then
bun build --compile --target=bun-darwin-x64 src/index.ts --outfile ../src-tauri/binaries/mermaid-code-mcp-x86_64-apple-darwin
elif [[ "$TARGET" == "aarch64-apple-darwin" ]]; then
bun build --compile --target=bun-darwin-arm64 src/index.ts --outfile ../src-tauri/binaries/mermaid-code-mcp-aarch64-apple-darwin
elif [[ "$TARGET" == "x86_64-pc-windows-msvc" ]]; then
bun build --compile --target=bun-windows-x64 src/index.ts --outfile ../src-tauri/binaries/mermaid-code-mcp-x86_64-pc-windows-msvc.exe
elif [[ "$TARGET" == "x86_64-unknown-linux-gnu" ]]; then
bun build --compile --target=bun-linux-x64 src/index.ts --outfile ../src-tauri/binaries/mermaid-code-mcp-x86_64-unknown-linux-gnu
fi
- name: Set version from tag
if: startsWith(github.ref, 'refs/tags/v')
shell: bash
run: |
VERSION=${GITHUB_REF_NAME#v}
sed -i.bak "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" src-tauri/tauri.conf.json
sed -i.bak "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" package.json
- uses: tauri-apps/tauri-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD || '' }}
APPIMAGE_EXTRACT_AND_RUN: 1
with:
releaseId: ${{ needs.create-release.outputs.release-id }}
tagName: ${{ github.ref_name }}
args: ${{ matrix.args }}
uploadUpdaterSignatures: false