Skip to content

Commit

Permalink
ci: upgrade all versions that are dependent on the workflow to the la…
Browse files Browse the repository at this point in the history
…test version (#490)

* ci: upgrade all versions that are dependent on the workflow to the latest version

* ci: remove node version
  • Loading branch information
simonguo committed Jun 7, 2024
1 parent acd24e0 commit 92703f5
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 33 deletions.
3 changes: 1 addition & 2 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"sandboxes": ["new", "vanilla"],
"node": "16"
"sandboxes": ["new", "vanilla"]
}
56 changes: 43 additions & 13 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
name: "CodeQL"
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: 'CodeQL'

on:
push:
branches: [ "main", "gh-pages", "v3" ]
branches: [main,]
pull_request:
branches: [ "main" ]
# The branches below must be a subset of the branches above
branches: [main]
schedule:
- cron: "58 3 * * 1"
- cron: '16 1 * * 2'

jobs:
analyze:
Expand All @@ -20,22 +32,40 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ javascript ]
language: ['javascript']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"
uses: github/codeql-action/analyze@v3
12 changes: 6 additions & 6 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2.0.1
- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
version: 7.3.0
version: 8

- name: Setup node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '20.x'

- name: Install
run: pnpm i
Expand All @@ -36,7 +36,7 @@ jobs:
run: npm run build:docs

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/nodejs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ jobs:
browser: [ChromeCi, Firefox]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2.0.1
- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
version: 7.3.0
version: 8

- name: Use Node.js 16.x
uses: actions/setup-node@v1
- name: Use Node.js LTS
uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: 'lts/*'
- name: Cache Node.js modules
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/nodejs-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ jobs:
name: 'Publish'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2.0.1
- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
version: 7.3.0
version: 8

# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: '16.x'
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: pnpm i
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
auto-install-peers=true

0 comments on commit 92703f5

Please sign in to comment.