-
Notifications
You must be signed in to change notification settings - Fork 6
44 lines (39 loc) · 1.22 KB
/
release-dispatch.yml
File metadata and controls
44 lines (39 loc) · 1.22 KB
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
name: release-dispatch
on:
workflow_dispatch:
inputs:
version:
description: Version to release
required: true
type: string
jobs:
propose-release:
permissions:
pull-requests: write
contents: write
runs-on: ubuntu-latest
env:
VERSION: ""
steps:
- uses: actions/checkout@v4
- name: "Setup toolchain"
uses: "actions-rs/toolchain@v1"
with:
toolchain: "stable"
- run: |
VERSION=${{ inputs.version }}
VERSION=${VERSION#v}
cargo install cargo-release --locked
cargo release version $VERSION --execute --no-confirm && cargo release replace --execute --no-confirm
- id: version_info
run: |
cargo install cargo-get --locked
echo "version=$(cargo get workspace.package.version)" >> $GITHUB_OUTPUT
- uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.CREATE_PR_TOKEN }}
title: "release(prepare): v${{ steps.version_info.outputs.version }}"
commit-message: "release(prepare): v${{ steps.version_info.outputs.version }}"
branch: prepare-release
base: main
delete-branch: true