-
Notifications
You must be signed in to change notification settings - Fork 21
60 lines (50 loc) · 1.41 KB
/
draft-release.yml
File metadata and controls
60 lines (50 loc) · 1.41 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Draft Release
on:
workflow_dispatch:
inputs:
version:
type: choice
required: true
description: 'Version number to bump'
options:
- patch
- minor
- major
permissions:
contents: write
issues: write
pull-requests: write
jobs:
publish-dry-run:
name: "Runs cargo publish --dry-run"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: publish crate
run: cargo publish --dry-run
release:
name: Create Release
needs: publish-dry-run
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Setup Cargo Binstall
uses: cargo-bins/cargo-binstall@main
- name: Install Rust Binaries
run: |
cargo binstall -y --force cargo-tag
- name: Bump Version
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
cd ./src/http-server
echo "CRATE_VERSION=$(cargo tag --no-tag -p=v ${{ inputs.version }})" >> $GITHUB_ENV
git checkout -b release/$CRATE_VERSION
git push origin HEAD
gh pr create --fill