Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 8 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: Build and Lint
on:
schedule:
# runs every monday at midnight
- cron: "0 0 * * 1"
push:
branches:
- master
pull_request:
workflow_call:
inputs:
rust_cache_prefix:
description: "Cache busting prefix for Rust dependencies"
default: "v0-rust"
type: string
workflow_dispatch:
env:
# increment this manually to force cache eviction
RUST_CACHE_PREFIX: "v0-rust"
RUST_CACHE_PREFIX: ${{ inputs.rust_cache_prefix }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -226,13 +226,3 @@ jobs:

- name: Test with embed feature
run: cargo test --workspace --release --features closure,embed,anyhow --no-fail-fast

release:
name: Create Release
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
needs: [lint, build, test-embed]
permissions:
id-token: write
contents: write
pull-requests: write
uses: extphprs/ext-php-rs/.github/workflows/release-plz.yml@master
5 changes: 2 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ on:
push:
branches-ignore:
- "release-plz-*"
pull_request:
branches-ignore:
- "release-plz-*"
workflow_call:
workflow_dispatch:
env:
# increment this manually to force cache eviction
RUST_CACHE_PREFIX: "v0-rust"
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
name: Deploy documentation
on:
workflow_call:
workflow_dispatch:
# runs every monday at midnight
schedule:
- cron: "0 0 * * 1"
push:
branches:
- master

jobs:
docs:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Master Branch Workflow
on:
push:
branches:
- master
workflow_dispatch:

jobs:
build_and_lint:
name: Build and Lint
uses: ./.github/workflows/build.yml
release:
name: Create Release (MR)
needs: [build_and_lint]
uses: ./.github/workflows/release-plz.yml
docs:
name: Build and Deploy Documentation
needs: [release]
if: needs.release.outputs.release_created == 'true'
permissions:
id-token: write
contents: write
pull-requests: write
uses: ./.github/workflows/docs.yml
13 changes: 13 additions & 0 deletions .github/workflows/merge_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Merge Request Workflow
on:
pull_request:
workflow_dispatch:

jobs:
build_and_lint:
name: Build and Lint
uses: ./.github/workflows/build.yml
coverage:
name: Code Coverage
if: ${{ ! startsWith(github.head_ref, 'release-plz-') }}
uses: ./.github/workflows/coverage.yml
7 changes: 7 additions & 0 deletions .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ permissions:

on:
workflow_call:
outputs:
release_created:
description: "Indicates if a release was created"
value: ${{ jobs.release-plz-release.outputs.release_created }}
workflow_dispatch:

jobs:
Expand All @@ -15,6 +19,8 @@ jobs:
if: github.ref == 'refs/heads/master'
permissions:
id-token: write
outputs:
release_created: ${{ steps.release-plz.outputs.release_created }}
env:
clang: "17"
php_version: "8.4"
Expand Down Expand Up @@ -53,6 +59,7 @@ jobs:
uses: rust-lang/crates-io-auth-action@v1
id: auth
- name: Run release-plz
id: release-plz
uses: release-plz/action@v0.5
with:
command: release
Expand Down