Skip to content

Commit 0a50ffe

Browse files
Copilotegorsmkv
andcommitted
feat: add workflow to bump version in Cargo.toml and lock deps
Co-authored-by: egorsmkv <7875085+egorsmkv@users.noreply.github.com>
1 parent 8b533d7 commit 0a50ffe

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: bump-version
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: 'New version (e.g., 0.3.0, patch, minor, major)'
7+
required: true
8+
type: string
9+
jobs:
10+
bump:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout source
14+
uses: actions/checkout@v4
15+
- name: Setup Rust toolchain
16+
uses: dtolnay/rust-toolchain@master
17+
with:
18+
toolchain: stable
19+
- name: Install cargo-edit
20+
run: cargo install cargo-edit
21+
shell: bash
22+
- name: Bump version in Cargo.toml
23+
run: |
24+
cargo set-version ${{ github.event.inputs.version }}
25+
shell: bash
26+
- name: Update Cargo.lock
27+
run: cargo update
28+
shell: bash
29+
- name: Create PR
30+
id: create-pr
31+
uses: peter-evans/create-pull-request@v7
32+
with:
33+
token: ${{ secrets.GITHUB_TOKEN }}
34+
commit-message: >-
35+
chore: bump version to ${{ github.event.inputs.version }}
36+
title: >-
37+
chore: bump version to ${{ github.event.inputs.version }}
38+
body: |
39+
Bump version to ${{ github.event.inputs.version }}
40+
41+
This PR was automatically generated by the bump-version workflow.
42+
branch: bump-version-${{ github.event.inputs.version }}

0 commit comments

Comments
 (0)