|
8 | 8 |
|
9 | 9 | jobs: |
10 | 10 | release-dispatch: |
11 | | - if: (github.event_name == 'push') || (github.event_name == 'pull_request' && github.event.pull_request.merged == true && github.base_ref == 'master') |
| 11 | + if: github.event_name == 'push' || (github.event.pull_request.merged == true && github.base_ref == 'master') |
12 | 12 | runs-on: ubuntu-latest |
13 | 13 | steps: |
14 | | - - name: Determine version level |
15 | | - id: level |
16 | | - run: | |
17 | | - if [[ "${{ github.event_name }}" == "pull_request" ]]; then |
18 | | - # Extract labels from merged PR |
19 | | - LABELS="${{ join(github.event.pull_request.labels.*.name, ',') }}" |
20 | | - echo "PR Labels: $LABELS" |
21 | | - |
22 | | - if [[ "$LABELS" == *"major"* ]]; then |
23 | | - echo "level=major" >> $GITHUB_OUTPUT |
24 | | - echo "Using PR label: major" |
25 | | - elif [[ "$LABELS" == *"minor"* ]]; then |
26 | | - echo "level=minor" >> $GITHUB_OUTPUT |
27 | | - echo "Using PR label: minor" |
28 | | - else |
29 | | - echo "level=patch" >> $GITHUB_OUTPUT |
30 | | - echo "Using PR label default: patch" |
31 | | - fi |
32 | | - else |
33 | | - # Push to master - default to patch |
34 | | - echo "level=patch" >> $GITHUB_OUTPUT |
35 | | - echo "Using push default: patch" |
36 | | - fi |
37 | | -
|
38 | 14 | - name: Send dispatch |
39 | 15 | uses: peter-evans/repository-dispatch@v3 |
40 | 16 | with: |
|
43 | 19 | event-type: release |
44 | 20 | client-payload: | |
45 | 21 | { |
46 | | - "level": "${{ steps.level.outputs.level }}", |
| 22 | + "level": "patch", |
47 | 23 | "source": "${{ github.event_name }}", |
48 | 24 | "ref": "${{ github.ref }}", |
49 | 25 | "sha": "${{ github.sha }}", |
|
0 commit comments