manual-cdn.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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: echo "dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT
  20. - uses: actions/cache@v3
  21. id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
  22. with:
  23. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  24. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  25. restore-keys: |
  26. ${{ runner.os }}-yarn-
  27. - name: Install Node.js
  28. uses: actions/setup-node@v3
  29. with:
  30. node-version: lts/*
  31. - name: Install dependencies
  32. run: corepack yarn install --immutable
  33. env:
  34. # https://docs.cypress.io/guides/references/advanced-installation#Skipping-installation
  35. CYPRESS_INSTALL_BINARY: 0
  36. - name: Build before publishing
  37. run: corepack yarn run build
  38. - name: Upload `${{ github.event.inputs.name }}` to CDN
  39. run: corepack yarn run uploadcdn ${{ github.event.inputs.name }}
  40. env:
  41. EDGLY_KEY: ${{secrets.EDGLY_KEY}}
  42. EDGLY_SECRET: ${{secrets.EDGLY_SECRET}}