mDNS-Browser Release v0.9.1 #35
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto Bump Patch | |
on: | |
release: | |
types: [prereleased] | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
bump-version: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Bump version in tauri.conf.json and tauri.android.conf.json | |
id: bump_version | |
run: | | |
CURRENT_VERSION=$(jq -r '.version' src-tauri/tauri.conf.json) | |
IFS='.' read -r -a VERSION_PARTS <<< "$CURRENT_VERSION" | |
MAJOR=${VERSION_PARTS[0]} | |
MINOR=${VERSION_PARTS[1]} | |
PATCH=${VERSION_PARTS[2]} | |
NEW_PATCH=$((PATCH + 1)) | |
NEW_VERSION="$MAJOR.$MINOR.$NEW_PATCH" | |
jq --indent 4 ".version = \"$NEW_VERSION\"" src-tauri/tauri.conf.json > src-tauri/tauri.conf.json.tmp && mv src-tauri/tauri.conf.json.tmp src-tauri/tauri.conf.json | |
jq --indent 4 ".version = \"$NEW_VERSION\"" src-tauri/tauri.android.conf.json > src-tauri/tauri.android.conf.json.tmp && mv src-tauri/tauri.android.conf.json.tmp src-tauri/tauri.android.conf.json | |
echo "new_version=$NEW_VERSION" >> "$GITHUB_ENV" | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: "chore(version) : bump to ${{ env.new_version }}" | |
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | |
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com> | |
signoff: false | |
base: main | |
branch: chore/bump-version-${{ env.new_version }} | |
branch-suffix: random | |
title: "chore(version): bump version to ${{ env.new_version }}" | |
draft: false |