|
11 | 11 | - review_requested
|
12 | 12 | jobs:
|
13 | 13 | set-milestone:
|
| 14 | + name: Set Milestone |
| 15 | + if: github.event.pull_request.milestone == null |
14 | 16 | runs-on: ubuntu-latest
|
| 17 | + outputs: |
| 18 | + check: ${{ steps.generate-checks-strategy.outputs.check }} |
15 | 19 | steps:
|
16 | 20 | - uses: actions/checkout@v1
|
17 |
| - if: github.event.pull_request.milestone == null |
18 | 21 | - name: 'Get Previous tag'
|
19 |
| - if: github.event.pull_request.milestone == null |
20 | 22 | id: previoustag
|
21 |
| - uses: "WyriHaximus/github-action-get-previous-tag@master" |
| 23 | + uses: "WyriHaximus/github-action-get-previous-tag@v1" |
22 | 24 | env:
|
23 | 25 | GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
24 |
| - - name: 'Get next minor version' |
25 |
| - if: github.event.pull_request.milestone == null |
| 26 | + - name: 'Get next versions' |
26 | 27 | id: semvers
|
27 |
| - uses: "WyriHaximus/github-action-next-semvers@master" |
| 28 | + uses: "WyriHaximus/github-action-next-semvers@v1" |
28 | 29 | with:
|
29 | 30 | version: ${{ steps.previoustag.outputs.tag }}
|
| 31 | + - name: 'Decide which version fits this PR' |
| 32 | + id: decidedversion |
| 33 | + run: | |
| 34 | + if [ "$(jq '.sender.id' -r ${GITHUB_EVENT_PATH})" = "49699333" ]; then |
| 35 | + printf "::set-output name=version::%s" "${PATCH}" |
| 36 | + exit 0 |
| 37 | + fi |
| 38 | +
|
| 39 | + composer install --no-progress --ansi --no-interaction --prefer-dist -o -q |
| 40 | +
|
| 41 | + if ! (./vendor/bin/roave-backward-compatibility-check); then |
| 42 | + printf "::set-output name=version::%s" "${MAJOR}" |
| 43 | + exit 0 |
| 44 | + fi |
| 45 | +
|
| 46 | + printf "::set-output name=version::%s" "${MINOR}" |
| 47 | + env: |
| 48 | + MAJOR: ${{ steps.semvers.outputs.major }} |
| 49 | + MINOR: ${{ steps.semvers.outputs.minor }} |
| 50 | + PATCH: ${{ steps.semvers.outputs.patch }} |
30 | 51 | - name: 'Get Milestones'
|
31 |
| - if: github.event.pull_request.milestone == null |
32 | 52 | uses: "WyriHaximus/github-action-get-milestones@master"
|
33 | 53 | id: milestones
|
34 | 54 | env:
|
35 | 55 | GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
36 | 56 | - run: printf "::set-output name=number::%s" $(printenv MILESTONES | jq --arg MILESTONE $(printenv MILESTONE) '.[] | select(.title == $MILESTONE) | .number')
|
37 |
| - if: github.event.pull_request.milestone == null |
38 | 57 | id: querymilestone
|
39 | 58 | env:
|
40 | 59 | MILESTONES: ${{ steps.milestones.outputs.milestones }}
|
41 |
| - MILESTONE: ${{ steps.semvers.outputs.minor }} |
| 60 | + MILESTONE: ${{ steps.decidedversion.outputs.version }} |
42 | 61 | - name: 'Create Milestone'
|
43 |
| - if: github.event.pull_request.milestone == null && steps.querymilestone.outputs.number == '' |
| 62 | + if: steps.querymilestone.outputs.number == '' |
44 | 63 | id: createmilestone
|
45 |
| - uses: "WyriHaximus/github-action-create-milestone@master" |
| 64 | + uses: "WyriHaximus/github-action-create-milestone@0.1.0" |
46 | 65 | with:
|
47 |
| - title: ${{ steps.semvers.outputs.minor }} |
| 66 | + title: ${{ steps.decidedversion.outputs.version }} |
48 | 67 | env:
|
49 | 68 | GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
50 | 69 | - name: 'Select found or created Milestone'
|
51 |
| - if: github.event.pull_request.milestone == null |
52 | 70 | id: selectmilestone
|
53 | 71 | run: |
|
54 | 72 | if [ $(echo ${QUERY_NUMBER} | wc -c) -eq 1 ] ; then
|
|
61 | 79 | CREATED_NUMBER: ${{ steps.createmilestone.outputs.number }}
|
62 | 80 | QUERY_NUMBER: ${{ steps.querymilestone.outputs.number }}
|
63 | 81 | - name: 'Set Milestone'
|
64 |
| - if: github.event.pull_request.milestone == null |
65 | 82 | uses: "WyriHaximus/github-action-set-milestone@master"
|
66 | 83 | with:
|
67 | 84 | issue_number: ${{ github.event.pull_request.number }}
|
|
0 commit comments