Skip to content

Commit 7a08064

Browse files
committed
jsonwebtoken@9
1 parent 5f5fde9 commit 7a08064

File tree

3 files changed

+11433
-1641
lines changed

3 files changed

+11433
-1641
lines changed

.github/workflows/ci.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: CI
5+
permissions:
6+
contents: write
7+
pull-requests: write
8+
on:
9+
push:
10+
branches:
11+
- "**"
12+
pull_request:
13+
branches:
14+
- "**"
15+
workflow_dispatch:
16+
17+
jobs:
18+
build:
19+
20+
runs-on: ubuntu-latest
21+
22+
strategy:
23+
matrix:
24+
node-version:
25+
- 18.x
26+
- 20.x
27+
- 22.x
28+
29+
steps:
30+
- uses: actions/checkout@v5
31+
- name: Use Node.js ${{ matrix.node-version }}
32+
uses: actions/setup-node@v6
33+
with:
34+
node-version: ${{ matrix.node-version }}
35+
- run: npm ci
36+
- run: npm run lint --if-present
37+
- run: npm test
38+
- run: npm run build --if-present
39+
- name: Save build
40+
if: matrix.node-version == '20.x'
41+
uses: actions/upload-artifact@v5
42+
with:
43+
name: build
44+
path: |
45+
.
46+
!node_modules
47+
retention-days: 1
48+
49+
dependabot:
50+
name: 'Dependabot'
51+
needs: build # After the E2E and build jobs, if one of them fails, it won't merge the PR.
52+
runs-on: ubuntu-latest
53+
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}} # Detect that the PR author is dependabot
54+
steps:
55+
- name: Enable auto-merge for Dependabot PRs
56+
run: gh pr merge --auto --merge "$PR_URL" # Use Github CLI to merge automatically the PR
57+
env:
58+
PR_URL: ${{github.event.pull_request.html_url}}
59+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)