Skip to content
This repository was archived by the owner on Feb 21, 2026. It is now read-only.

v2.1.1

v2.1.1 #3

Workflow file for this run

name: Bump Version
# Permissions needed for the workflow
permissions:
contents: write # Needed to push version changes
on:
release:
types: [published]
jobs:
bump-version:
runs-on: ubuntu-latest
# Prevent duplicate runs when both a tag is pushed and a release is published
concurrency:
group: bump-version-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Bump patch version
id: bump-version
run: |
# Read the current version from tauri.conf.json
CURRENT_VERSION=$(node -e "console.log(require('./src-tauri/tauri.conf.json').version)")
echo "Current version: $CURRENT_VERSION"
# Split the version into major, minor, and patch
IFS='.' read -r -a VERSION_PARTS <<< "$CURRENT_VERSION"
MAJOR="${VERSION_PARTS[0]}"
MINOR="${VERSION_PARTS[1]}"
PATCH="${VERSION_PARTS[2]}"
# Increment the patch version
NEW_PATCH=$((PATCH + 1))
NEW_VERSION="$MAJOR.$MINOR.$NEW_PATCH"
echo "New version: $NEW_VERSION"
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
# Update the version in tauri.conf.json
node -e "
const fs = require('fs');
const path = './src-tauri/tauri.conf.json';
const config = require(path);
config.version = '$NEW_VERSION';
fs.writeFileSync(path, JSON.stringify(config, null, 2) + '\n');
"
- name: Commit and push changes
run: |
# Skip if commit message contains "Bump version" to prevent loops
if [[ "$(git log -1 --pretty=%B)" == *"Bump version"* ]]; then
echo "Skipping version bump as this was triggered by a version bump commit"
exit 0
fi
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add src-tauri/tauri.conf.json
git commit -m "Bump version to ${{ steps.bump-version.outputs.new_version }}"
git push origin master