manual-cdn.yml 1.4 KB

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