manual-cdn.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. name: Manually triggered CDN upload
  2. on:
  3. workflow_dispatch:
  4. inputs:
  5. name:
  6. description: 'Package to upload'
  7. required: true
  8. default: 'uppy'
  9. env:
  10. YARN_ENABLE_GLOBAL_CACHE: false
  11. jobs:
  12. upload:
  13. runs-on: ubuntu-latest
  14. steps:
  15. - name: Checkout sources
  16. uses: actions/checkout@v3
  17. - name: Get yarn cache directory path
  18. id: yarn-cache-dir-path
  19. run:
  20. echo "dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT
  21. - uses: actions/cache@v4
  22. id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
  23. with:
  24. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  25. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  26. restore-keys: |
  27. ${{ runner.os }}-yarn-
  28. - name: Install Node.js
  29. uses: actions/setup-node@v3
  30. with:
  31. node-version: lts/*
  32. - name: Install dependencies
  33. run: corepack yarn install --immutable
  34. env:
  35. # https://docs.cypress.io/guides/references/advanced-installation#Skipping-installation
  36. CYPRESS_INSTALL_BINARY: 0
  37. - name: Build before publishing
  38. run: corepack yarn run build
  39. - name: Upload `${{ github.event.inputs.name }}` to CDN
  40. run: corepack yarn run uploadcdn ${{ github.event.inputs.name }}
  41. env:
  42. EDGLY_KEY: ${{secrets.EDGLY_KEY}}
  43. EDGLY_SECRET: ${{secrets.EDGLY_SECRET}}