manual-cdn.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 "::set-output name=dir::$(corepack yarn config get cacheFolder)"
  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. - name: Build before publishing
  32. run: corepack yarn run build
  33. - name: Upload `${{ github.event.inputs.name }}` to CDN
  34. run: corepack yarn run uploadcdn ${{ github.event.inputs.name }}
  35. env:
  36. EDGLY_KEY: ${{secrets.EDGLY_KEY}}
  37. EDGLY_SECRET: ${{secrets.EDGLY_SECRET}}