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: 26 additions & 0 deletions .github/actions/checkout-release-candidate/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Check out release candidate
description: Materialize the unpushed release commit prepared by the release workflow
inputs:
release-sha:
description: Expected release candidate commit
required: true
runs:
using: composite
steps:
- uses: actions/download-artifact@v4
with:
name: release-candidate
path: ${{ runner.temp }}/release-candidate
- shell: bash
env:
RELEASE_SHA: ${{ inputs.release-sha }}
run: |
git fetch \
"$RUNNER_TEMP/release-candidate/release-candidate.bundle" \
refs/heads/release-candidate:refs/remotes/release-candidate
candidate=$(git rev-parse refs/remotes/release-candidate)
if [[ $candidate != "$RELEASE_SHA" ]]; then
echo "Release candidate $candidate does not match expected commit $RELEASE_SHA." >&2
exit 1
fi
git checkout --detach "$RELEASE_SHA"
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,30 @@ on:
branches:
- main
pull_request:
types: [opened, edited, synchronize, reopened]

jobs:
test:
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Validate Conventional Commit title
if: github.event_name == 'pull_request'
env:
PR_TITLE: ${{ github.event.pull_request.title }}
shell: bash
run: |
pattern='^[a-z][a-z0-9-]*(\([^()]+\))?(!)?: .+'
if [[ ! $PR_TITLE =~ $pattern ]]; then
echo "Pull request titles must use Conventional Commit syntax." >&2
echo "Examples: feat: add a feature, fix(api): correct behavior, feat!: break compatibility" >&2
exit 1
fi
- uses: useblacksmith/checkout@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.94.0
components: rustfmt, clippy
- run: scripts/tests/test_next_release_version.sh
- run: cargo fmt --check
- run: cargo clippy --all-targets --all-features -- -D warnings
- run: cargo test --locked
Expand Down
Loading
Loading