فهرست منبع

ci: make sure Yarn's global cache is disabled (#4268)

Yarn v4 enables global caching by default, using a local cache
simplifies the use of @actions/cache.
Also simplifies the "Publish to the npm registry" step.
Antoine du Hamel 2 سال پیش
والد
کامیت
3437074765

+ 4 - 1
.github/workflows/bundlers.yml

@@ -15,9 +15,12 @@ on:
       - '.github/**'
       - '!.github/workflows/bundlers.yml'
 
+env:
+  YARN_ENABLE_GLOBAL_CACHE: false
+
 jobs:
   isolate_uppy:
-    name: Isolate Uppy package
+    name: Isolate Uppy packages
     runs-on: ubuntu-latest
     steps:
       - name: Checkout sources

+ 3 - 0
.github/workflows/ci.yml

@@ -25,6 +25,9 @@ on:
       - '.github/**'
       - '!.github/workflows/ci.yml'
 
+env:
+  YARN_ENABLE_GLOBAL_CACHE: false
+
 jobs:
   unit_tests:
     name: Unit tests

+ 3 - 0
.github/workflows/companion-deploy.yml

@@ -11,6 +11,9 @@ on:
       - 'packages/@uppy/companion/**'
       - '.github/workflows/companion-deploy.yml'
 
+env:
+  YARN_ENABLE_GLOBAL_CACHE: false
+
 jobs:
   npm:
     name: Generate npm tarball

+ 3 - 0
.github/workflows/companion.yml

@@ -14,6 +14,9 @@ on:
       - 'packages/@uppy/companion/**'
       - '.github/workflows/companion.yml'
 
+env:
+  YARN_ENABLE_GLOBAL_CACHE: false
+
 jobs:
   test:
     name: Unit tests

+ 3 - 0
.github/workflows/e2e.yml

@@ -26,6 +26,9 @@ on:
 
 concurrency: ${{ github.workflow }}--${{ github.ref }}
 
+env:
+  YARN_ENABLE_GLOBAL_CACHE: false
+
 jobs:
   e2e:
     if: ${{ !github.event.pull_request || (contains(github.event.pull_request.labels.*.name, 'safe to test') && github.event.pull_request.state == 'open') || (github.event.pull_request.head.repo.full_name == github.repository && github.event.event_name != 'labeled') }}

+ 3 - 0
.github/workflows/linters.yml

@@ -13,6 +13,9 @@ on:
       - '.github/**'
       - '!.github/workflows/linters.yml'
 
+env:
+  YARN_ENABLE_GLOBAL_CACHE: false
+
 jobs:
   lint_js:
     name: Lint JavaScript/TypeScript

+ 3 - 0
.github/workflows/lockile_check.yml

@@ -11,6 +11,9 @@ on:
     paths:
       - yarn.lock
 
+env:
+  YARN_ENABLE_GLOBAL_CACHE: false
+
 jobs:
   lint_lockfile:
     name: Lint yarn.lock

+ 3 - 0
.github/workflows/manual-cdn.yml

@@ -7,6 +7,9 @@ on:
         required: true
         default: "uppy"
 
+env:
+  YARN_ENABLE_GLOBAL_CACHE: false
+
 jobs:
   upload:
     runs-on: ubuntu-latest

+ 3 - 0
.github/workflows/release-candidate.yml

@@ -3,6 +3,9 @@ on:
   push:
     branches: release
 
+env:
+  YARN_ENABLE_GLOBAL_CACHE: false
+
 jobs:
   prepare-release:
     name: Prepare release candidate Pull Request

+ 6 - 3
.github/workflows/release.yml

@@ -3,6 +3,9 @@ on:
   pull_request_review:
     types: [submitted]
 
+env:
+  YARN_ENABLE_GLOBAL_CACHE: false
+
 jobs:
   release:
     name: Publish releases
@@ -43,10 +46,10 @@ jobs:
         run: corepack yarn run build
       - name: Hack to allow the publish of the Angular package
         run: corepack yarn workspace @uppy/angular prepublishOnly
-      - name: Login to NPM
-        run: corepack yarn config set npmAuthToken ${{ toJSON(secrets.NPM_TOKEN) }}
-      - name: Publish to NPM
+      - name: Publish to the npm registry
         run: corepack yarn workspaces foreach --no-private npm publish --access public --tolerate-republish
+        env:
+          YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
       - name: Merge PR
         id: merge
         run: |

+ 3 - 0
.github/workflows/website.yml

@@ -9,6 +9,9 @@ on:
       - '.github/workflows/website.yml'
   workflow_dispatch:
 
+env:
+  YARN_ENABLE_GLOBAL_CACHE: false
+
 jobs:
   deploy:
     name: Deploy