Skip to content

Commit 9070d5f

Browse files
committed
fix: 更新 release.yml 工作流以使用最新的 checkout 和 Rust 工具链配置
1 parent a3d1f37 commit 9070d5f

File tree

1 file changed

+36
-2
lines changed

1 file changed

+36
-2
lines changed

.github/workflows/release.yml

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,21 @@ jobs:
1616
if: ${{ github.repository_owner == 'drivercraft' && (github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success') }}
1717
runs-on: ubuntu-latest
1818
steps:
19-
- name: Checkout code
20-
uses: actions/checkout@v4
19+
- &checkout
20+
name: Checkout repository
21+
uses: actions/checkout@v6
22+
with:
23+
fetch-depth: 0
24+
persist-credentials: false
25+
- &install-rust
26+
name: Install Rust toolchain
27+
uses: dtolnay/rust-toolchain@stable
28+
29+
- &setup-libudenv:
30+
uses: awalsh128/cache-apt-pkgs-action@latest
31+
with:
32+
packages: libudev-dev
33+
version: 1.0
2134

2235
- name: Release with release-plz
2336
uses: release-plz/action@v0.5
@@ -26,6 +39,27 @@ jobs:
2639
env:
2740
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2841
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
42+
# Create a PR with the new versions and changelog, preparing the next release.
43+
release-plz-pr:
44+
name: Release-plz PR
45+
runs-on: ubuntu-latest
46+
permissions:
47+
contents: write
48+
pull-requests: write
49+
concurrency:
50+
group: release-plz-${{ github.ref }}
51+
cancel-in-progress: false
52+
steps:
53+
- *checkout
54+
- *install-rust
55+
- *setup-libudenv
56+
- name: Run release-plz
57+
uses: release-plz/action@v0.5
58+
with:
59+
command: release-pr
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
2963

3064
build-binaries:
3165
needs: release-plz

0 commit comments

Comments
 (0)