Skip to content

Commit 71241a6

Browse files
committed
Add release workflow
1 parent 11f5070 commit 71241a6

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/release.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
workflow_dispatch:
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: cargo publish
17+
run: |
18+
cargo publish -p pyo3-stub-gen-derive
19+
cargo publish -p pyo3-stub-gen
20+
env:
21+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
22+
23+
next_version:
24+
runs-on: ubuntu-latest
25+
needs: publish
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
30+
- name: Install cargo-edit
31+
run: cargo install cargo-edit
32+
33+
- name: Bump version
34+
run: |
35+
cargo set-version --bump patch
36+
echo "NEW_VERSION=$(cargo metadata --no-deps --format-version=1 | jq -r '.packages[0].version')" >> $GITHUB_ENV
37+
38+
- name: Create Pull Request
39+
uses: peter-evans/create-pull-request@v6
40+
with:
41+
title: "Start developing ${{ env.NEW_VERSION }}"
42+
branch: "rust-version-update/${{ env.NEW_VERSION }}"
43+
base: "main"

0 commit comments

Comments
 (0)