diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 3ed4c30ba..d65032fd4 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -13,15 +13,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ - uses: actions/checkout@v2 - with: - persist-credentials: false + uses: actions/checkout@v4 - name: Fetch the version number 📝 id: fetch-version - uses: actions/github-script@v3 + uses: actions/github-script@v7 with: - github-token: ${{ secrets.GITHUB_TOKEN }} result-encoding: string script: | const package = require(`${process.env.GITHUB_WORKSPACE}/attractions/package.json`); @@ -29,9 +26,8 @@ jobs: - name: Fetch the changelog 📝 id: fetch-changelog - uses: actions/github-script@v3 + uses: actions/github-script@v7 with: - github-token: ${{ secrets.GITHUB_TOKEN }} result-encoding: string script: | const changelog = require('fs').readFileSync('CHANGELOG.md', { encoding: 'utf-8' }).split('\n'); @@ -40,9 +36,8 @@ jobs: return changelog.slice(start + 1, end).join('\n').trim(); - name: Create a release 🔖 - uses: actions/github-script@v3 + uses: actions/github-script@v7 with: - github-token: ${{ secrets.GITHUB_TOKEN }} script: | await github.rest.repos.createRelease({ owner: context.repo.owner, diff --git a/.github/workflows/build-pr-docs.yml b/.github/workflows/build-pr-docs.yml index 91386bcc2..ca94c932b 100644 --- a/.github/workflows/build-pr-docs.yml +++ b/.github/workflows/build-pr-docs.yml @@ -2,6 +2,7 @@ name: Build docs from a pull request on: pull_request: paths: + - .github/workflows/** - attractions/** - docs/** - CHANGELOG.md @@ -18,49 +19,38 @@ jobs: working-directory: docs steps: - name: Checkout 🛎️ - uses: actions/checkout@v2 - with: - persist-credentials: false - - - name: Set up Node 14 📦 - uses: actions/setup-node@v2 - with: - node-version: '14' + uses: actions/checkout@v4 - - name: Cache pnpm modules 🗄 - uses: actions/cache@v2 - env: - cache-name: cache-pnpm-modules + - name: Use pnpm + uses: pnpm/action-setup@6e1964dde3397a825e79e4607ad57f3f7ca2c7cb with: - path: ~/.pnpm-store - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}- + version: ^8.10.2 - - name: Install pnpm 🧰 - uses: pnpm/action-setup@v2.0.1 + - name: Set up Node 20 📦 + uses: actions/setup-node@v4 with: - version: 6.14.2 + node-version: '20' + cache: pnpm - name: Build docs 🔧 env: SAPPER_APP_BASEPATH: attractions/${{ github.event.number }} run: | pnpm install - pnpm run export -- --basepath attractions/${{ github.event.number }} + pnpm run export --basepath attractions/${{ github.event.number }} - name: Save the PR number 📩 run: echo "${{ github.event.number }}" > ../pr_number.txt # The ".." is to go outside the docs directory - name: Upload the PR number 📤 - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: pr_number path: pr_number.txt - name: Upload the built docs 📤 - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: docs path: docs/__sapper__/export/attractions/${{ github.event.number }}/ diff --git a/.github/workflows/deploy-pr-docs.yml b/.github/workflows/deploy-pr-docs.yml index 37017661d..247f962ee 100644 --- a/.github/workflows/deploy-pr-docs.yml +++ b/.github/workflows/deploy-pr-docs.yml @@ -13,7 +13,7 @@ jobs: if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - name: Download the docs artifact 📥 - uses: dawidd6/action-download-artifact@891cccee4b25d3306cf5edafa174ddc1d969871f + uses: dawidd6/action-download-artifact@a430ac5786b39ad5869da25a98130624d2ce340c with: workflow: build-pr-docs.yml commit: ${{ github.event.workflow_run.head_sha }} @@ -21,7 +21,7 @@ jobs: path: ./docs - name: Download the PR number artifact 📥 - uses: dawidd6/action-download-artifact@891cccee4b25d3306cf5edafa174ddc1d969871f + uses: dawidd6/action-download-artifact@a430ac5786b39ad5869da25a98130624d2ce340c with: workflow: build-pr-docs.yml name: pr_number @@ -30,7 +30,7 @@ jobs: run: echo "PR_NUMBER=$(cat pr_number.txt)" >> $GITHUB_ENV - name: Publish 🚀 - uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 + uses: peaceiris/actions-gh-pages@4eb285e828117bca26638192c3ed309c622e7bad with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: docs @@ -38,9 +38,8 @@ jobs: keep_files: true - name: Post the URL on the PR 🖊 - uses: actions/github-script@v3 + uses: actions/github-script@v7 with: - github-token: ${{ secrets.GITHUB_TOKEN }} script: | # yeah, I know it's weird how you get PR comments with `.issues` const prComments = (await github.issues.listComments({ diff --git a/.github/workflows/lint-pr.yml b/.github/workflows/lint-pr.yml index e3736999b..3ec696f8d 100644 --- a/.github/workflows/lint-pr.yml +++ b/.github/workflows/lint-pr.yml @@ -7,29 +7,18 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ - uses: actions/checkout@v2 - with: - persist-credentials: false - - - name: Set up Node 14 📦 - uses: actions/setup-node@v2 - with: - node-version: '14' + uses: actions/checkout@v4 - - name: Cache pnpm modules 🗄 - uses: actions/cache@v2 - env: - cache-name: cache-pnpm-modules + - name: Use pnpm + uses: pnpm/action-setup@6e1964dde3397a825e79e4607ad57f3f7ca2c7cb with: - path: ~/.pnpm-store - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}- + version: ^8.10.2 - - name: Install pnpm 🧰 - uses: pnpm/action-setup@v2.0.1 + - name: Set up Node 20 📦 + uses: actions/setup-node@v4 with: - version: 6.14.2 + node-version: '20' + cache: pnpm - name: Install dependencies 🧰 run: pnpm install diff --git a/.github/workflows/manual-deploy.yml b/.github/workflows/manual-deploy.yml index 8e551889b..5d463ca8e 100644 --- a/.github/workflows/manual-deploy.yml +++ b/.github/workflows/manual-deploy.yml @@ -19,39 +19,28 @@ jobs: working-directory: docs steps: - name: Checkout 🛎️ - uses: actions/checkout@v2 - with: - persist-credentials: false - - - name: Set up Node 14 📦 - uses: actions/setup-node@v2 - with: - node-version: '14' + uses: actions/checkout@v4 - - name: Cache pnpm modules 🗄 - uses: actions/cache@v2 - env: - cache-name: cache-pnpm-modules + - name: Use pnpm + uses: pnpm/action-setup@6e1964dde3397a825e79e4607ad57f3f7ca2c7cb with: - path: ~/.pnpm-store - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}- + version: ^8.10.2 - - name: Install pnpm 🧰 - uses: pnpm/action-setup@v2.0.1 + - name: Set up Node 20 📦 + uses: actions/setup-node@v4 with: - version: 6.14.2 + node-version: '20' + cache: pnpm - name: Install and build 🔧 env: SAPPER_APP_BASEPATH: attractions/${{ github.event.inputs.prefix }} run: | pnpm install - pnpm run export -- --basepath attractions/${{ github.event.inputs.prefix }} + pnpm run export --basepath attractions/${{ github.event.inputs.prefix }} - name: Publish 🚀 - uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 + uses: peaceiris/actions-gh-pages@4eb285e828117bca26638192c3ed309c622e7bad with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: docs/__sapper__/export/attractions/${{ github.event.inputs.prefix }} diff --git a/.github/workflows/on-release.yml b/.github/workflows/on-release.yml index 18cdc7a55..ed7ca0bf7 100644 --- a/.github/workflows/on-release.yml +++ b/.github/workflows/on-release.yml @@ -12,39 +12,28 @@ jobs: working-directory: docs steps: - name: Checkout 🛎️ - uses: actions/checkout@v2 - with: - persist-credentials: false + uses: actions/checkout@v4 - - name: Set up Node 14 📦 - uses: actions/setup-node@v2 + - name: Use pnpm + uses: pnpm/action-setup@6e1964dde3397a825e79e4607ad57f3f7ca2c7cb with: - node-version: '14' + version: ^8.10.2 - - name: Cache pnpm modules 🗄 - uses: actions/cache@v2 - env: - cache-name: cache-pnpm-modules + - name: Set up Node 20 📦 + uses: actions/setup-node@v4 with: - path: ~/.pnpm-store - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}- - - - name: Install pnpm 🧰 - uses: pnpm/action-setup@v2.0.1 - with: - version: 6.14.2 + node-version: '20' + cache: pnpm - name: Build docs 🔧 env: SAPPER_APP_BASEPATH: attractions run: | pnpm install - pnpm run export -- --basepath attractions + pnpm run export --basepath attractions - name: Publish 🚀 - uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 + uses: peaceiris/actions-gh-pages@4eb285e828117bca26638192c3ed309c622e7bad with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: docs/__sapper__/export/attractions/ @@ -55,30 +44,19 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ - uses: actions/checkout@v2 - with: - persist-credentials: false + uses: actions/checkout@v4 - - name: Set up Node 14 📦 - uses: actions/setup-node@v2 + - name: Use pnpm + uses: pnpm/action-setup@6e1964dde3397a825e79e4607ad57f3f7ca2c7cb with: - node-version: '14' - registry-url: 'https://registry.npmjs.org' + version: ^8.10.2 - - name: Cache pnpm modules 🗄 - uses: actions/cache@v2 - env: - cache-name: cache-pnpm-modules + - name: Set up Node 20 📦 + uses: actions/setup-node@v4 with: - path: ~/.pnpm-store - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}- - - - name: Install pnpm 🧰 - uses: pnpm/action-setup@v2.0.1 - with: - version: 6.14.2 + node-version: '20' + registry-url: 'https://registry.npmjs.org' + cache: pnpm - name: Build bundles 🔧 run: | diff --git a/.github/workflows/suggest-release.yml b/.github/workflows/suggest-release.yml index 194c650cd..b68870e70 100644 --- a/.github/workflows/suggest-release.yml +++ b/.github/workflows/suggest-release.yml @@ -14,14 +14,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ - uses: actions/checkout@v2 - with: - persist-credentials: false + uses: actions/checkout@v4 - name: Add the [new release] tag 🔖 - uses: actions/github-script@v3 + uses: actions/github-script@v7 with: - github-token: ${{ secrets.GITHUB_TOKEN }} script: | const package = require(`${process.env.GITHUB_WORKSPACE}/attractions/package.json`); const currentVersion = `v${package.version}`; diff --git a/package.json b/package.json index b3cad9cbc..ee2b5f6bd 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,9 @@ "private": true, "scripts": { "lint-js": "eslint . --ext \".svelte,.js\" --cache", - "lint-js:fix": "pnpm run lint-js -- --fix", + "lint-js:fix": "pnpm run lint-js --fix", "lint-css": "stylelint . --cache", - "lint-css:fix": "pnpm run lint-css -- --fix", + "lint-css:fix": "pnpm run lint-css --fix", "lint-svelte": "svelte-check --workspace attractions --diagnostic-sources svelte,css --output human --fail-on-warnings && svelte-check --workspace docs --diagnostic-sources svelte,css --output human --fail-on-warnings --ignore \"src/node_modules\"", "lint-svelte:fix": "svelte-check --workspace attractions && svelte-check --workspace docs --ignore \"src/node_modules\"", "lint-format": "prettier --plugin-search-dir=. --check .",