Skip to content

Commit e1a67ec

Browse files
authored
ci: Only run tket2-py release checks on release PR (#976)
1 parent 8c9b810 commit e1a67ec

File tree

1 file changed

+8
-38
lines changed

1 file changed

+8
-38
lines changed

.github/workflows/release-checks.yml

Lines changed: 8 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
name: Release checks
1+
# A check that ensures that `tket2-py` works correctly with the latest release of `tket2-exts` and `tket2-eccs`.
2+
#
3+
# If this fails, it is likely that the packages require a release before we can release the `tket2` python lib.
4+
5+
name: tket2-py Release checks
26

37
on:
48
pull_request:
5-
merge_group:
6-
types: [checks_requested]
9+
branches:
10+
- release-please--branches--main--components--tket2-py
711
workflow_dispatch: {}
812

913
env:
@@ -16,42 +20,8 @@ env:
1620
PYTHON_LOWEST: "3.10"
1721

1822
jobs:
19-
# Check if changes were made to the relevant files.
20-
# Always returns true if running on the default branch, to ensure all changes are throughly checked.
21-
changes:
22-
name: Check for changes
23-
runs-on: ubuntu-latest
24-
# Required permissions
25-
permissions:
26-
pull-requests: read
27-
# Set job outputs to values from filter step
28-
# These outputs are always true when running after a merge to main, or if the PR has a `run-ci-checks` label.
29-
outputs:
30-
rust-release: ${{ steps.source-branch.outputs.rust == 'true' }}
31-
python-release: ${{ steps.source-branch.outputs.py == 'true' }}
32-
steps:
33-
- uses: actions/checkout@v4
34-
- name: Override label
35-
id: source-branch
36-
run: |
37-
if [ "${{ github.event_name == 'pull_request' && startsWith(github.head_ref, 'release-please-') }}" == "true" ]; then
38-
echo "This is a python release PR"
39-
echo "py=true" >> $GITHUB_OUTPUT
40-
elif [ "${{ github.event_name == 'pull_request' && startsWith(github.head_ref, 'release-plz-') }}" == "true" ]; then
41-
echo "This is a rust release PR"
42-
echo "rust=true" >> $GITHUB_OUTPUT
43-
elif [ "${{ github.event_name != 'pull_request' }}" == "true" ]; then
44-
echo "Manual trigger"
45-
echo "py=true" >> $GITHUB_OUTPUT
46-
echo "rust=true" >> $GITHUB_OUTPUT
47-
else
48-
echo "Not a release PR"
49-
fi
50-
5123
py-release:
52-
name: Check `tket2-py` release
53-
needs: changes
54-
if: ${{ needs.changes.outputs.python-release == 'true' }}
24+
name: Check `tket2-py` release compatibility
5525
runs-on: ubuntu-latest
5626
steps:
5727
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)