Skip to content

Commit 9372013

Browse files
committed
ci(release): trigger release via reusable workflow
https://docs.github.com/en/actions/how-tos/reuse-automations/reuse-workflows Refs: #579, #578
1 parent 630d7b5 commit 9372013

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,3 +226,9 @@ jobs:
226226
227227
- name: Test with embed feature
228228
run: cargo test --workspace --release --features closure,embed,anyhow --no-fail-fast
229+
230+
release:
231+
name: Create Release
232+
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
233+
needs: [lint, build, test-embed]
234+
uses: extphprs/ext-php-rs/.github/workflows/release-plz.yml@master

.github/workflows/release-plz.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,19 @@ permissions:
55
contents: write
66

77
on:
8-
workflow_run:
9-
workflows: ["Build and Lint"]
10-
branches: ["master"]
11-
types:
12-
- completed
8+
workflow_call:
9+
workflow_dispatch:
1310

1411
jobs:
1512
release-plz-release:
1613
name: Release-plz release
1714
runs-on: ubuntu-latest
15+
if: github.ref == 'refs/heads/master'
1816
permissions:
1917
id-token: write
2018
env:
21-
clang: '17'
22-
php_version: '8.4'
19+
clang: "17"
20+
php_version: "8.4"
2321
steps:
2422
- name: Checkout repository
2523
uses: actions/checkout@v5
@@ -64,6 +62,7 @@ jobs:
6462
release-plz-pr:
6563
name: Release-plz PR
6664
runs-on: ubuntu-latest
65+
if: github.ref == 'refs/heads/master'
6766
permissions:
6867
id-token: write
6968
concurrency:

0 commit comments

Comments
 (0)