3 Commits

Author SHA1 Message Date
Gitea Actions
9033881274 chore: bump version to 0.2.1 [skip ci] 2026-03-21 18:53:23 +00:00
Claude
1ed34e0bbb Add auto-increment version and release workflow
All checks were successful
Release / Bump version and tag (push) Successful in 3s
- New release.yml: bumps patch version, commits with skip-ci marker, tags, creates Gitea release
- Build workflows now trigger on v* tags only (not branch push)
- Simplified upload steps: use tag directly, retry loop for release lookup
- Fix macOS: install jq if missing
- Sync python/pyproject.toml version to 0.2.0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 11:53:13 -07:00
Claude
b7a00af2e0 Fix duplicate CI runs: remove tags trigger, detect tags on commit
Some checks failed
Build macOS / Build (macOS) (push) Failing after 3m31s
Build Linux / Build (Linux) (push) Failing after 7m22s
Build Windows / Build (Windows) (push) Successful in 16m5s
Pushing to main + a tag triggered 6 workflows (3 per trigger).
Now only main pushes trigger builds. The upload step detects version
tags on the current commit via git tag --points-at HEAD.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 11:30:57 -07:00
8 changed files with 132 additions and 63 deletions

View File

@@ -2,10 +2,7 @@ name: Build Linux
on: on:
push: push:
branches: [main]
tags: ["v*"] tags: ["v*"]
pull_request:
branches: [main]
env: env:
PYTHON_VERSION: "3.11" PYTHON_VERSION: "3.11"
@@ -66,34 +63,33 @@ jobs:
# ── Release ── # ── Release ──
- name: Upload to release - name: Upload to release
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
env: env:
BUILD_TOKEN: ${{ secrets.BUILD_TOKEN }} BUILD_TOKEN: ${{ secrets.BUILD_TOKEN }}
run: | run: |
sudo apt-get install -y jq sudo apt-get install -y jq
REPO_API="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}" REPO_API="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}"
# Use version tag for tag pushes, "latest" for main TAG="${GITHUB_REF_NAME}"
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then RELEASE_NAME="Voice to Notes ${TAG}"
TAG="${GITHUB_REF#refs/tags/}"
RELEASE_NAME="Voice to Notes ${TAG}"
PRERELEASE=false
else
TAG="latest"
RELEASE_NAME="Voice to Notes (Latest Build)"
PRERELEASE=true
fi
echo "Release tag: ${TAG}" echo "Release tag: ${TAG}"
RELEASE_ID=$(curl -s -H "Authorization: token ${BUILD_TOKEN}" \ # Wait for release to be created by the release workflow
"${REPO_API}/releases/tags/${TAG}" | jq -r '.id // empty') for i in 1 2 3 4 5; do
RELEASE_ID=$(curl -s -H "Authorization: token ${BUILD_TOKEN}" \
"${REPO_API}/releases/tags/${TAG}" | jq -r '.id // empty')
if [ -n "${RELEASE_ID}" ] && [ "${RELEASE_ID}" != "null" ]; then
break
fi
echo "Release not found yet, waiting 10s... (attempt $i)"
sleep 10
done
if [ -z "${RELEASE_ID}" ]; then # Fallback: create release if it still doesn't exist
if [ -z "${RELEASE_ID}" ] || [ "${RELEASE_ID}" = "null" ]; then
RELEASE_ID=$(curl -s -X POST \ RELEASE_ID=$(curl -s -X POST \
-H "Authorization: token ${BUILD_TOKEN}" \ -H "Authorization: token ${BUILD_TOKEN}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d "{\"tag_name\": \"${TAG}\", \"name\": \"${RELEASE_NAME}\", \"body\": \"Automated build.\", \"draft\": false, \"prerelease\": ${PRERELEASE}}" \ -d "{\"tag_name\": \"${TAG}\", \"name\": \"${RELEASE_NAME}\", \"body\": \"Automated build.\", \"draft\": false, \"prerelease\": false}" \
"${REPO_API}/releases" | jq -r '.id') "${REPO_API}/releases" | jq -r '.id')
fi fi

View File

@@ -2,10 +2,7 @@ name: Build macOS
on: on:
push: push:
branches: [main]
tags: ["v*"] tags: ["v*"]
pull_request:
branches: [main]
env: env:
PYTHON_VERSION: "3.11" PYTHON_VERSION: "3.11"
@@ -65,33 +62,35 @@ jobs:
# ── Release ── # ── Release ──
- name: Upload to release - name: Upload to release
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
env: env:
BUILD_TOKEN: ${{ secrets.BUILD_TOKEN }} BUILD_TOKEN: ${{ secrets.BUILD_TOKEN }}
run: | run: |
# Ensure jq is available
which jq || brew install jq
REPO_API="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}" REPO_API="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}"
# Use version tag for tag pushes, "latest" for main TAG="${GITHUB_REF_NAME}"
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then RELEASE_NAME="Voice to Notes ${TAG}"
TAG="${GITHUB_REF#refs/tags/}"
RELEASE_NAME="Voice to Notes ${TAG}"
PRERELEASE=false
else
TAG="latest"
RELEASE_NAME="Voice to Notes (Latest Build)"
PRERELEASE=true
fi
echo "Release tag: ${TAG}" echo "Release tag: ${TAG}"
RELEASE_ID=$(curl -s -H "Authorization: token ${BUILD_TOKEN}" \ # Wait for release to be created by the release workflow
"${REPO_API}/releases/tags/${TAG}" | jq -r '.id // empty') for i in 1 2 3 4 5; do
RELEASE_ID=$(curl -s -H "Authorization: token ${BUILD_TOKEN}" \
"${REPO_API}/releases/tags/${TAG}" | jq -r '.id // empty')
if [ -n "${RELEASE_ID}" ] && [ "${RELEASE_ID}" != "null" ]; then
break
fi
echo "Release not found yet, waiting 10s... (attempt $i)"
sleep 10
done
if [ -z "${RELEASE_ID}" ]; then # Fallback: create release if it still doesn't exist
if [ -z "${RELEASE_ID}" ] || [ "${RELEASE_ID}" = "null" ]; then
RELEASE_ID=$(curl -s -X POST \ RELEASE_ID=$(curl -s -X POST \
-H "Authorization: token ${BUILD_TOKEN}" \ -H "Authorization: token ${BUILD_TOKEN}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d "{\"tag_name\": \"${TAG}\", \"name\": \"${RELEASE_NAME}\", \"body\": \"Automated build.\", \"draft\": false, \"prerelease\": ${PRERELEASE}}" \ -d "{\"tag_name\": \"${TAG}\", \"name\": \"${RELEASE_NAME}\", \"body\": \"Automated build.\", \"draft\": false, \"prerelease\": false}" \
"${REPO_API}/releases" | jq -r '.id') "${REPO_API}/releases" | jq -r '.id')
fi fi

View File

@@ -2,10 +2,7 @@ name: Build Windows
on: on:
push: push:
branches: [main]
tags: ["v*"] tags: ["v*"]
pull_request:
branches: [main]
env: env:
PYTHON_VERSION: "3.11" PYTHON_VERSION: "3.11"
@@ -75,7 +72,6 @@ jobs:
# ── Release ── # ── Release ──
- name: Upload to release - name: Upload to release
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
shell: powershell shell: powershell
env: env:
BUILD_TOKEN: ${{ secrets.BUILD_TOKEN }} BUILD_TOKEN: ${{ secrets.BUILD_TOKEN }}
@@ -83,30 +79,31 @@ jobs:
$REPO_API = "${{ github.server_url }}/api/v1/repos/${{ github.repository }}" $REPO_API = "${{ github.server_url }}/api/v1/repos/${{ github.repository }}"
$Headers = @{ "Authorization" = "token $env:BUILD_TOKEN" } $Headers = @{ "Authorization" = "token $env:BUILD_TOKEN" }
# Use version tag for tag pushes, "latest" for main $TAG = "${{ github.ref_name }}"
$REF = "${{ github.ref }}" $RELEASE_NAME = "Voice to Notes ${TAG}"
if ($REF.StartsWith("refs/tags/")) {
$TAG = $REF.Replace("refs/tags/", "")
$RELEASE_NAME = "Voice to Notes ${TAG}"
$PRERELEASE = $false
} else {
$TAG = "latest"
$RELEASE_NAME = "Voice to Notes (Latest Build)"
$PRERELEASE = $true
}
Write-Host "Release tag: ${TAG}" Write-Host "Release tag: ${TAG}"
try { # Wait for release to be created by the release workflow
$release = Invoke-RestMethod -Uri "${REPO_API}/releases/tags/${TAG}" -Headers $Headers -ErrorAction Stop $RELEASE_ID = $null
$RELEASE_ID = $release.id for ($i = 1; $i -le 5; $i++) {
} catch { try {
$release = Invoke-RestMethod -Uri "${REPO_API}/releases/tags/${TAG}" -Headers $Headers -ErrorAction Stop
$RELEASE_ID = $release.id
break
} catch {
Write-Host "Release not found yet, waiting 10s... (attempt $i)"
Start-Sleep -Seconds 10
}
}
# Fallback: create release if it still doesn't exist
if (-not $RELEASE_ID) {
$body = @{ $body = @{
tag_name = $TAG tag_name = $TAG
name = $RELEASE_NAME name = $RELEASE_NAME
body = "Automated build." body = "Automated build."
draft = $false draft = $false
prerelease = $PRERELEASE prerelease = $false
} | ConvertTo-Json } | ConvertTo-Json
$release = Invoke-RestMethod -Uri "${REPO_API}/releases" -Method Post -Headers $Headers -ContentType "application/json" -Body $body $release = Invoke-RestMethod -Uri "${REPO_API}/releases" -Method Post -Headers $Headers -ContentType "application/json" -Body $body
$RELEASE_ID = $release.id $RELEASE_ID = $release.id

View File

@@ -0,0 +1,77 @@
name: Release
on:
push:
branches: [main]
jobs:
bump-version:
name: Bump version and tag
# Skip if this is a version-bump commit (avoid infinite loop)
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure git
run: |
git config user.name "Gitea Actions"
git config user.email "actions@gitea.local"
- name: Bump patch version
run: |
# Read current version from package.json
CURRENT=$(grep '"version"' package.json | head -1 | sed 's/.*"version": *"\([^"]*\)".*/\1/')
echo "Current version: ${CURRENT}"
# Increment patch number
MAJOR=$(echo "${CURRENT}" | cut -d. -f1)
MINOR=$(echo "${CURRENT}" | cut -d. -f2)
PATCH=$(echo "${CURRENT}" | cut -d. -f3)
NEW_PATCH=$((PATCH + 1))
NEW_VERSION="${MAJOR}.${MINOR}.${NEW_PATCH}"
echo "New version: ${NEW_VERSION}"
# Update package.json
sed -i "s/\"version\": \"${CURRENT}\"/\"version\": \"${NEW_VERSION}\"/" package.json
# Update src-tauri/tauri.conf.json
sed -i "s/\"version\": \"${CURRENT}\"/\"version\": \"${NEW_VERSION}\"/" src-tauri/tauri.conf.json
# Update src-tauri/Cargo.toml (match version = "x.y.z" in [package] section)
sed -i "s/^version = \"${CURRENT}\"/version = \"${NEW_VERSION}\"/" src-tauri/Cargo.toml
# Update python/pyproject.toml
sed -i "s/^version = \".*\"/version = \"${NEW_VERSION}\"/" python/pyproject.toml
echo "NEW_VERSION=${NEW_VERSION}" >> $GITHUB_ENV
- name: Commit and tag
env:
BUILD_TOKEN: ${{ secrets.BUILD_TOKEN }}
run: |
git add package.json src-tauri/tauri.conf.json src-tauri/Cargo.toml python/pyproject.toml
git commit -m "chore: bump version to ${NEW_VERSION} [skip ci]"
git tag "v${NEW_VERSION}"
# Push using token for authentication
REMOTE_URL=$(git remote get-url origin | sed "s|://|://gitea-actions:${BUILD_TOKEN}@|")
git push "${REMOTE_URL}" HEAD:main
git push "${REMOTE_URL}" "v${NEW_VERSION}"
- name: Create Gitea release
env:
BUILD_TOKEN: ${{ secrets.BUILD_TOKEN }}
run: |
REPO_API="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}"
TAG="v${NEW_VERSION}"
RELEASE_NAME="Voice to Notes ${TAG}"
curl -s -X POST \
-H "Authorization: token ${BUILD_TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"tag_name\": \"${TAG}\", \"name\": \"${RELEASE_NAME}\", \"body\": \"Automated build.\", \"draft\": false, \"prerelease\": false}" \
"${REPO_API}/releases"
echo "Created release: ${RELEASE_NAME}"

View File

@@ -1,6 +1,6 @@
{ {
"name": "voice-to-notes", "name": "voice-to-notes",
"version": "0.2.0", "version": "0.2.1",
"description": "Desktop app for transcribing audio/video with speaker identification", "description": "Desktop app for transcribing audio/video with speaker identification",
"type": "module", "type": "module",
"scripts": { "scripts": {

View File

@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "voice-to-notes" name = "voice-to-notes"
version = "0.1.0" version = "0.2.1"
description = "Python sidecar for Voice to Notes — transcription, diarization, and AI services" description = "Python sidecar for Voice to Notes — transcription, diarization, and AI services"
requires-python = ">=3.11" requires-python = ">=3.11"
license = "MIT" license = "MIT"

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "voice-to-notes" name = "voice-to-notes"
version = "0.2.0" version = "0.2.1"
description = "Voice to Notes — desktop transcription with speaker identification" description = "Voice to Notes — desktop transcription with speaker identification"
authors = ["Voice to Notes Contributors"] authors = ["Voice to Notes Contributors"]
license = "MIT" license = "MIT"

View File

@@ -1,7 +1,7 @@
{ {
"$schema": "https://schema.tauri.app/config/2", "$schema": "https://schema.tauri.app/config/2",
"productName": "Voice to Notes", "productName": "Voice to Notes",
"version": "0.2.0", "version": "0.2.1",
"identifier": "com.voicetonotes.app", "identifier": "com.voicetonotes.app",
"build": { "build": {
"beforeDevCommand": "npm run dev", "beforeDevCommand": "npm run dev",