-
Notifications
You must be signed in to change notification settings - Fork 1
馃 actions: Update Node.js version to 24 #193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,95 +1,75 @@ | ||||||
| name: reusable publish (lerna) | ||||||
|
|
||||||
| on: | ||||||
| workflow_call: | ||||||
| inputs: | ||||||
| npm: | ||||||
| description: 'Publish lerna monorepo to NPM' | ||||||
| description: Publish lerna monorepo to NPM | ||||||
| type: boolean | ||||||
| default: false | ||||||
| gh: | ||||||
| description: 'Publish lerna monorepo to GitHub Packages' | ||||||
| description: Publish lerna monorepo to GitHub Packages | ||||||
| type: boolean | ||||||
| default: true | ||||||
| secrets: | ||||||
| npm_token: | ||||||
| required: false | ||||||
|
|
||||||
| env: | ||||||
| NODE_VERSION: 22 | ||||||
| NPM_SCOPE: '@stoe' | ||||||
|
|
||||||
| NPM_SCOPE: "@stoe" | ||||||
| jobs: | ||||||
| publish_npm: | ||||||
| if: ${{ inputs.npm }} | ||||||
|
|
||||||
| runs-on: ubuntu-latest | ||||||
|
|
||||||
| concurrency: | ||||||
| group: ${{ github.workflow }}-npm-${{ github.ref }} | ||||||
| cancel-in-progress: true | ||||||
|
|
||||||
| permissions: | ||||||
| contents: read | ||||||
| packages: write | ||||||
|
|
||||||
| env: | ||||||
| CI: true | ||||||
| NODE_AUTH_TOKEN: ${{ secrets.npm_token }} | ||||||
|
|
||||||
| steps: | ||||||
| - name: Checkout | ||||||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||||||
|
|
||||||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | ||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| - name: Setup Node.js | ||||||
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | ||||||
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 | ||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| with: | ||||||
| node-version: ${{ env.NODE_VERSION }} | ||||||
| node-version: 24 | ||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| scope: ${{ env.NPM_SCOPE }} | ||||||
| registry-url: 'https://registry.npmjs.org' | ||||||
|
|
||||||
| registry-url: https://registry.npmjs.org | ||||||
| - name: NPM config | ||||||
| run: | | ||||||
| npm pkg delete scripts.prepare | ||||||
| npm install --ignore-scripts --pure-lockfile | ||||||
| git ls-files -z . | xargs -0 git update-index --assume-unchanged | ||||||
|
|
||||||
| - name: GitHub Packages publish | ||||||
| run: npx lerna publish from-package --yes --registry https://registry.npmjs.org | ||||||
|
|
||||||
| publish_gh: | ||||||
| if: ${{ inputs.gh }} | ||||||
|
|
||||||
| runs-on: ubuntu-latest | ||||||
|
|
||||||
| concurrency: | ||||||
| group: ${{ github.workflow }}-gh-${{ github.ref }} | ||||||
| cancel-in-progress: true | ||||||
|
|
||||||
| permissions: | ||||||
| contents: read | ||||||
| packages: write | ||||||
|
|
||||||
| env: | ||||||
| CI: true | ||||||
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||
|
|
||||||
| steps: | ||||||
| - name: Checkout | ||||||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||||||
|
|
||||||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | ||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| - name: Setup Node.js | ||||||
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | ||||||
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 | ||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| with: | ||||||
| node-version: ${{ env.NODE_VERSION }} | ||||||
| node-version: 24 | ||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| scope: ${{ env.NPM_SCOPE }} | ||||||
| registry-url: 'https://npm.pkg.github.com' | ||||||
|
|
||||||
| registry-url: https://npm.pkg.github.com | ||||||
| - name: NPM config | ||||||
| run: | | ||||||
| npm pkg delete scripts.prepare | ||||||
| npm install --ignore-scripts --pure-lockfile | ||||||
| git ls-files -z . | xargs -0 git update-index --assume-unchanged | ||||||
|
|
||||||
| - name: GitHub Packages publish | ||||||
| run: npx lerna publish from-package --yes --registry https://npm.pkg.github.com | ||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,103 +1,87 @@ | ||||||
| name: reusable test (lerna) | ||||||
|
|
||||||
| on: | ||||||
| workflow_call: | ||||||
|
|
||||||
| workflow_call: null | ||||||
| jobs: | ||||||
| test-matrix: | ||||||
| runs-on: ubuntu-latest | ||||||
|
|
||||||
| permissions: | ||||||
| contents: read | ||||||
| packages: read | ||||||
|
|
||||||
| env: | ||||||
| CI: true | ||||||
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||
|
|
||||||
| strategy: | ||||||
| fail-fast: true | ||||||
| matrix: | ||||||
| node-version: | ||||||
| - 20 | ||||||
| - 22 | ||||||
| experimental: [false] | ||||||
| - 24 | ||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| - 24 | ||||||
| experimental: | ||||||
| - false | ||||||
| include: | ||||||
| - node-version: 24 | ||||||
| experimental: true | ||||||
| - node-version: lts/* | ||||||
| experimental: true | ||||||
|
|
||||||
| continue-on-error: ${{ matrix.experimental }} | ||||||
|
|
||||||
| concurrency: | ||||||
| group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.node-version }} | ||||||
| cancel-in-progress: true | ||||||
|
|
||||||
| steps: | ||||||
| - name: Checkout | ||||||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||||||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | ||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| with: | ||||||
| lfs: true | ||||||
|
|
||||||
| - name: Check repository visibility | ||||||
| if: ${{ github.event_name == 'pull_request' }} | ||||||
| id: visibility | ||||||
| run: | | ||||||
| echo "isPrivate=$(gh repo view --json isPrivate --jq '.isPrivate')" >> $GITHUB_OUTPUT | ||||||
| run: > | ||||||
| echo "isPrivate=$(gh repo view --json isPrivate --jq '.isPrivate')" >> | ||||||
| $GITHUB_OUTPUT | ||||||
| env: | ||||||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||
|
|
||||||
| - name: Check repository dependency graph | ||||||
| uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0 | ||||||
| if: ${{ github.event_name == 'pull_request' && steps.visibility.outputs.isPrivate == 'false' }} | ||||||
|
|
||||||
| uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 | ||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| if: ${{ github.event_name == 'pull_request' && | ||||||
| steps.visibility.outputs.isPrivate == 'false' }} | ||||||
| - name: Setup Node.js v${{ matrix.node-version }} | ||||||
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | ||||||
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 | ||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| with: | ||||||
| node-version: ${{ matrix.node-version }} | ||||||
| registry-url: 'https://npm.pkg.github.com' | ||||||
| cache: 'npm' | ||||||
|
|
||||||
| node-version: 24 | ||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| registry-url: https://npm.pkg.github.com | ||||||
| cache: npm | ||||||
| - name: Get NPM cache directory | ||||||
| id: npm-cache-dir | ||||||
| run: | | ||||||
| echo "NPM_CACHE_DIR=$(npm config get cache)" >> "$GITHUB_OUTPUT" | ||||||
|
|
||||||
| - name: Cache node modules | ||||||
| id: cache-npm | ||||||
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | ||||||
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 | ||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| env: | ||||||
| cache-name: cache-node-modules | ||||||
| with: | ||||||
| path: ${{ steps.npm-cache-dir.outputs.NPM_CACHE_DIR }} | ||||||
| key: npm-${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||||||
| key: npm-${{ runner.os }}-${{ env.cache-name }}-${{ | ||||||
| hashFiles('**/package-lock.json') }} | ||||||
| restore-keys: | | ||||||
| npm-${{ runner.os }}-${{ env.cache-name }}- | ||||||
| npm-${{ runner.os }}- | ||||||
| npm- | ||||||
|
|
||||||
| - name: NPM config | ||||||
| run: | | ||||||
| npm pkg delete scripts.prepare | ||||||
| npm install --ignore-scripts --pure-lockfile | ||||||
|
|
||||||
| - name: List the state of node modules | ||||||
| if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} | ||||||
| continue-on-error: true | ||||||
| run: npm list --omit=dev | ||||||
|
|
||||||
| - name: Build | ||||||
| run: npm run build --if-present | ||||||
|
|
||||||
| - name: Test | ||||||
| run: npx lerna run test | ||||||
|
|
||||||
| test: | ||||||
| runs-on: ubuntu-latest | ||||||
|
|
||||||
| needs: test-matrix | ||||||
|
|
||||||
| steps: | ||||||
| - name: Success | ||||||
| run: echo "success" | ||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,92 +1,72 @@ | ||||||
| name: reusable publish (package) | ||||||
|
|
||||||
| on: | ||||||
| workflow_call: | ||||||
| inputs: | ||||||
| npm: | ||||||
| description: 'Publish to NPM' | ||||||
| description: Publish to NPM | ||||||
| type: boolean | ||||||
| default: false | ||||||
| gh: | ||||||
| description: 'Publish to GitHub Packages' | ||||||
| description: Publish to GitHub Packages | ||||||
| type: boolean | ||||||
| default: true | ||||||
|
|
||||||
| env: | ||||||
| NODE_VERSION: 24 | ||||||
| NPM_SCOPE: '@stoe' | ||||||
|
|
||||||
| NPM_SCOPE: "@stoe" | ||||||
| jobs: | ||||||
| publish_npm: | ||||||
| if: ${{ inputs.npm }} | ||||||
|
|
||||||
| runs-on: ubuntu-latest | ||||||
|
|
||||||
| concurrency: | ||||||
| group: ${{ github.workflow }}-npm-${{ github.ref }} | ||||||
| cancel-in-progress: true | ||||||
|
|
||||||
| permissions: | ||||||
| contents: read | ||||||
| id-token: write | ||||||
|
|
||||||
| env: | ||||||
| CI: true | ||||||
|
|
||||||
| steps: | ||||||
| - name: Checkout | ||||||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||||||
|
|
||||||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | ||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| - name: Setup Node.js | ||||||
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | ||||||
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 | ||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| with: | ||||||
| node-version: ${{ env.NODE_VERSION }} | ||||||
| node-version: 24 | ||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| scope: ${{ env.NPM_SCOPE }} | ||||||
| registry-url: 'https://registry.npmjs.org' | ||||||
|
|
||||||
| registry-url: https://registry.npmjs.org | ||||||
| - name: NPM config | ||||||
| run: | | ||||||
| npm pkg delete scripts.prepare | ||||||
| npm install --ignore-scripts --pure-lockfile | ||||||
| git ls-files -z . | xargs -0 git update-index --assume-unchanged | ||||||
|
|
||||||
| - name: NPM publish | ||||||
| run: NODE_AUTH_TOKEN="" npm publish --access public --provenance | ||||||
|
|
||||||
| publish_gh: | ||||||
| if: ${{ inputs.gh }} | ||||||
|
|
||||||
| runs-on: ubuntu-latest | ||||||
|
|
||||||
| concurrency: | ||||||
| group: ${{ github.workflow }}-gh-${{ github.ref }} | ||||||
| cancel-in-progress: true | ||||||
|
|
||||||
| permissions: | ||||||
| contents: read | ||||||
| packages: write | ||||||
| id-token: write | ||||||
|
|
||||||
| env: | ||||||
| CI: true | ||||||
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||
|
|
||||||
| steps: | ||||||
| - name: Checkout | ||||||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||||||
|
|
||||||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | ||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| - name: Setup Node.js | ||||||
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | ||||||
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 | ||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| with: | ||||||
| node-version: ${{ env.NODE_VERSION }} | ||||||
| node-version: 24 | ||||||
| scope: ${{ env.NPM_SCOPE }} | ||||||
| registry-url: 'https://npm.pkg.github.com' | ||||||
|
|
||||||
| registry-url: https://npm.pkg.github.com | ||||||
| - name: NPM config | ||||||
| run: | | ||||||
| npm pkg delete scripts.prepare | ||||||
| npm install --ignore-scripts --pure-lockfile | ||||||
| git ls-files -z . | xargs -0 git update-index --assume-unchanged | ||||||
|
|
||||||
| - name: GitHub Packages publish | ||||||
| run: npm publish --access public | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.