|
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 |
2 | 6 |
|
3 | 7 | on:
|
4 | 8 | pull_request:
|
5 |
| - merge_group: |
6 |
| - types: [checks_requested] |
| 9 | + branches: |
| 10 | + - release-please--branches--main--components--tket2-py |
7 | 11 | workflow_dispatch: {}
|
8 | 12 |
|
9 | 13 | env:
|
|
16 | 20 | PYTHON_LOWEST: "3.10"
|
17 | 21 |
|
18 | 22 | 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 |
| -
|
51 | 23 | 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 |
55 | 25 | runs-on: ubuntu-latest
|
56 | 26 | steps:
|
57 | 27 | - uses: actions/checkout@v4
|
|
0 commit comments