From e07c3743375e2bf4470818f6d20c269edce7b7a1 Mon Sep 17 00:00:00 2001 From: iCrawl Date: Sat, 8 Jan 2022 23:30:28 +0100 Subject: [PATCH] ci: fix publishing dev versions --- .github/workflows/labelsync.yml | 2 +- .github/workflows/publish-dev.yml | 14 ++++++++++++++ .github/workflows/test.yml | 6 +++--- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/labelsync.yml b/.github/workflows/labelsync.yml index 3ce9468ad..ee419d522 100644 --- a/.github/workflows/labelsync.yml +++ b/.github/workflows/labelsync.yml @@ -16,7 +16,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - - name: Run label sync + - name: Label sync uses: crazy-max/ghaction-github-labeler@v3 with: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/publish-dev.yml b/.github/workflows/publish-dev.yml index f8e6f5b56..e1306c39c 100644 --- a/.github/workflows/publish-dev.yml +++ b/.github/workflows/publish-dev.yml @@ -16,6 +16,17 @@ jobs: with: node-version: 16 registry-url: https://registry.npmjs.org/ + cache: 'yarn' + cache-dependency-path: yarn.lock + + - name: Turbo cache + id: turbo-cache + uses: actions/cache@v2 + with: + path: .turbo + key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ github.sha }} + restore-keys: | + turbo-${{ github.job }}-${{ github.ref_name }}- - name: Check previous released version id: pre-release @@ -28,6 +39,9 @@ jobs: if: steps.pre-release.outputs.release == 'true' run: yarn --immutable + - name: Build dependencies + run: yarn build --cache-dir=".turbo" + - name: Deprecate old versions if: steps.pre-release.outputs.release == 'true' run: npm deprecate discord.js@"~$(jq --raw-output '.version' packages/discord.js/package.json)" "no longer supported" || true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d6b8729f6..87031165b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,11 +27,11 @@ jobs: - name: Install dependencies run: yarn --immutable - - name: Run eslint + - name: ESLint run: yarn lint --cache-dir=".turbo" - - name: Run tests + - name: Tests run: yarn test --cache-dir=".turbo" - - name: Run build + - name: Build run: yarn build --cache-dir=".turbo"