check-release.yml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. name: Check Release
  2. on:
  3. push:
  4. branches: [3.2.x]
  5. pull_request:
  6. branches: [3.2.x]
  7. release:
  8. types: [published]
  9. jobs:
  10. check_release:
  11. runs-on: ubuntu-latest
  12. strategy:
  13. matrix:
  14. group: [check_release, link_check]
  15. steps:
  16. - name: Checkout
  17. uses: actions/checkout@v2
  18. - name: Set up Node
  19. uses: actions/setup-node@v1
  20. with:
  21. node-version: '14.x'
  22. - uses: actions/checkout@v2
  23. - name: Set up Python
  24. uses: actions/setup-python@v1
  25. with:
  26. python-version: 3.9
  27. # Cache yarn
  28. - name: Get yarn cache directory path
  29. id: yarn-cache-dir-path
  30. run: echo "::set-output name=dir::$(yarn cache dir)"
  31. - name: Cache yarn
  32. uses: actions/cache@v2
  33. id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
  34. with:
  35. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  36. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  37. restore-keys: |
  38. ${{ runner.os }}-yarn-
  39. - name: Get pip cache dir
  40. id: pip-cache
  41. run: |
  42. echo "::set-output name=dir::$(pip cache dir)"
  43. - name: Cache pip
  44. uses: actions/cache@v2
  45. with:
  46. path: ${{ steps.pip-cache.outputs.dir }}
  47. key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}
  48. restore-keys: |
  49. ${{ runner.os }}-pip-
  50. ${{ runner.os }}-pip-
  51. - name: Cache checked links build
  52. uses: actions/cache@v2
  53. if: ${{ matrix.group == 'link_check' }}
  54. with:
  55. path: ~/.cache/pytest-link-check
  56. key: ${{ runner.os }}-linkcheck-${{ hashFiles('**/*.rst', '**/*.md') }}-changelog
  57. restore-keys: |
  58. ${{ runner.os }}-linkcheck-
  59. - name: Check Release
  60. if: ${{ matrix.group == 'check_release' }}
  61. uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v1
  62. with:
  63. token: ${{ secrets.GITHUB_TOKEN }}
  64. version_spec: next
  65. - name: Run Link Check
  66. if: ${{ matrix.group == 'link_check' }}
  67. uses: jupyter-server/jupyter_releaser/.github/actions/check-links@v1
  68. - name: Upload Assets
  69. if: ${{ matrix.group == 'check_release' }}
  70. uses: actions/upload-artifact@v2
  71. with:
  72. name: dist-files
  73. path: |
  74. .jupyter_releaser_checkout/dist/*.*