-
Notifications
You must be signed in to change notification settings - Fork 55
66 lines (56 loc) · 1.62 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: release
on:
workflow_dispatch:
inputs:
bump:
description: Type of version bump
type: choice
options:
- major
- minor
- patch
- release
- rc
- beta
- alpha
required: true
default: patch
env:
CARGO_TERM_COLOR: always
jobs:
version:
name: Increment version
runs-on: ubuntu-20.04
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- run: |
git config --global user.email "[email protected]"
git config --global user.name "Versioneer"
- name: Retrieve MSRV from workspace Cargo.toml
id: rust_version
uses: SebRollen/[email protected]
with:
file: Cargo.toml
field: "workspace.package.rust-version"
- name: Install stable
uses: dtolnay/rust-toolchain@stable
- name: Enable cache
uses: Swatinem/rust-cache@v2
- name: Install cargo-release
run: cargo install --version 0.24.4 cargo-release
- name: Increment version and tag
run: cargo release ${{ inputs.bump }} --no-publish --no-push --no-tag -vv --no-confirm --execute
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
commit-message: ${{ inputs.bump }} version bump
delete-branch: true
title: ${{ inputs.bump }} version bump
body: ${{ inputs.bump }} version bump
token: ${{ secrets.ACTIONS_PAT }}