|
35 | 35 | readme-links-test: |
36 | 36 | uses: ./.github/workflows/test-readme-links.yml |
37 | 37 |
|
38 | | - generated-api-diff: |
39 | | - runs-on: ubuntu-latest |
40 | | - permissions: |
41 | | - pull-requests: write |
42 | | - steps: |
43 | | - - name: Checkout PR ref |
44 | | - uses: actions/checkout@v4 |
45 | | - - name: gradle openApiGenerate (PR ref) |
46 | | - uses: ./.github/actions/build |
47 | | - with: |
48 | | - args: 'openApiGenerate postProcessGeneratedApi' |
49 | | - - run: mv ./library/build/post-processed-api ./pr-ref-api |
50 | | - - name: Checkout base ref |
51 | | - uses: actions/checkout@v4 |
52 | | - with: |
53 | | - path: ./base-ref-checkout |
54 | | - ref: ${{ github.base_ref }} |
55 | | - - name: gradle openApiGenerate (base ref) |
56 | | - uses: ./.github/actions/build |
57 | | - with: |
58 | | - args: '-p ./base-ref-checkout openApiGenerate postProcessGeneratedApi' |
59 | | - - run: mv ./base-ref-checkout/library/build/post-processed-api ./base-ref-api |
60 | | - - name: Diff generated APIs |
61 | | - run: | |
62 | | - diff -ur ./base-ref-api ./pr-ref-api | tee generated-api.patch || true |
63 | | - echo -e '### Generated API diff\n\n```diff' > comment.md |
64 | | - cat generated-api.patch >> comment.md |
65 | | - echo -e '```' >> comment.md |
66 | | - - name: Find existing comment |
67 | | - uses: peter-evans/find-comment@v3 |
68 | | - id: find-comment |
69 | | - with: |
70 | | - issue-number: ${{ github.event.pull_request.number }} |
71 | | - comment-author: 'github-actions[bot]' |
72 | | - body-includes: 'Generated API diff' |
73 | | - - name: Create or update diff comment |
74 | | - uses: peter-evans/create-or-update-comment@v4 |
75 | | - with: |
76 | | - issue-number: ${{ github.event.pull_request.number }} |
77 | | - comment-id: ${{ steps.find-comment.outputs.comment-id }} |
78 | | - body-file: 'comment.md' |
79 | | - edit-mode: replace |
80 | | - # Upload patch as PR artifact with short expiration |
81 | | - - name: Upload generated-api.patch |
82 | | - uses: actions/upload-artifact@v2 |
83 | | - with: |
84 | | - name: generated-api.patch |
85 | | - path: generated-api.patch |
86 | | - retention-days: 7 |
87 | | - |
88 | | - |
89 | 38 | dry-run-publish-javadoc: |
90 | 39 | uses: ./.github/workflows/publish-javadoc.yml |
91 | 40 | with: |
|
0 commit comments