Skip to content

Commit ea7023c

Browse files
committed
ci: update workflow
1 parent 6b2e2c5 commit ea7023c

3 files changed

Lines changed: 48 additions & 43 deletions

File tree

Lines changed: 6 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,14 @@
1-
# For most projects, this workflow file will not need changing; you simply need
2-
# to commit it to your repository.
3-
#
4-
# You may wish to alter this file to override the set of languages analyzed,
5-
# or to provide custom queries or build logic.
6-
#
7-
# ******** NOTE ********
8-
# We have attempted to detect the languages in your repository. Please check
9-
# the `language` matrix defined below to confirm you have the correct set of
10-
# supported CodeQL languages.
11-
#
121
name: "CodeQL"
132

143
on:
154
push:
16-
branches: ["main"]
175
pull_request:
18-
# The branches below must be a subset of the branches above
19-
branches: ["main"]
206
schedule:
217
- cron: "44 21 * * 1"
228

9+
permissions:
10+
contents: read
11+
2312
jobs:
2413
analyze:
2514
name: Analyze
@@ -32,40 +21,20 @@ jobs:
3221
strategy:
3322
fail-fast: false
3423
matrix:
35-
language: ["javascript"]
36-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
24+
language:
25+
- javascript
3826

3927
steps:
4028
- name: Checkout repository
4129
uses: actions/checkout@v6
4230

43-
# Initializes the CodeQL tools for scanning.
4431
- name: Initialize CodeQL
4532
uses: github/codeql-action/init@v4
4633
with:
4734
languages: ${{ matrix.language }}
48-
# If you wish to specify custom queries, you can do so here or in a config file.
49-
# By default, queries listed here will override any specified in a config file.
50-
# Prefix the list here with "+" to use these queries and those in the config file.
51-
52-
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
53-
# queries: security-extended,security-and-quality
5435

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

60-
# ℹ️ Command-line programs to run using the OS shell.
61-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
62-
63-
# If the Autobuild fails above, remove it and uncomment the following three lines.
64-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
65-
66-
# - run: |
67-
# echo "Run, Build Application using script"
68-
# ./location_of_script_within_repo/buildscript.sh
69-
7039
- name: Perform CodeQL Analysis
7140
uses: github/codeql-action/analyze@v4

.github/workflows/publish.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: read
10+
id-token: write
11+
12+
jobs:
13+
publish:
14+
name: Publish Package
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v6
18+
19+
- name: Install pnpm
20+
uses: pnpm/action-setup@v4
21+
22+
- name: Set up Node.js
23+
uses: actions/setup-node@v6
24+
with:
25+
node-version: 24
26+
cache: pnpm
27+
28+
- name: Install Deps
29+
run: pnpm install --frozen-lockfile
30+
31+
- name: Build project
32+
env:
33+
NODE_OPTIONS: --max_old_space_size=8192
34+
run: pnpm run build
35+
36+
- name: Publish to npm
37+
run: pnpm publish --no-git-checks

.github/workflows/test.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ name: Test
22

33
on:
44
push:
5-
branches:
6-
- main
7-
- work
85
pull_request:
96
branches:
107
- main
118

9+
permissions:
10+
contents: read
11+
1212
jobs:
1313
linter-and-unit:
1414
name: Linter and Unit test
@@ -39,7 +39,6 @@ jobs:
3939
- name: Build project and upload bundle
4040
env:
4141
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
42-
NODE_OPTIONS: --max_old_space_size=8192
4342
run: pnpm run build
4443

4544
- name: Linter test
@@ -52,13 +51,13 @@ jobs:
5251
run: pnpm run test
5352

5453
- name: Upload coverage
55-
if: ${{ !cancelled() && github.ref == 'refs/heads/main' && matrix.node-version == 22 }}
54+
if: ${{ !cancelled() && github.ref == 'refs/heads/main' && matrix.node-version == 24 }}
5655
uses: codecov/codecov-action@v5
5756
with:
5857
token: ${{ secrets.CODECOV_TOKEN }}
5958

6059
- name: Upload test results
61-
if: ${{ !cancelled() && github.ref == 'refs/heads/main' && matrix.node-version == 22 }}
60+
if: ${{ !cancelled() && github.ref == 'refs/heads/main' && matrix.node-version == 24 }}
6261
uses: codecov/test-results-action@v1
6362
with:
6463
file: ./coverage/test-report.junit.xml

0 commit comments

Comments
 (0)