Skip to content

Commit 6ca6f69

Browse files
committed
ci: update workflows
1 parent 8432ff0 commit 6ca6f69

9 files changed

Lines changed: 85 additions & 226 deletions

File tree

.github/labels.json

Lines changed: 0 additions & 170 deletions
This file was deleted.

.github/lock.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/stale.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/checks.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: checks
2+
on:
3+
- push
4+
- pull_request
5+
- workflow_call
6+
7+
jobs:
8+
test:
9+
uses: adonisjs/redis/.github/workflows/test.yml@main
10+
11+
lint:
12+
uses: adonisjs/.github/.github/workflows/lint.yml@main
13+
14+
typecheck:
15+
uses: adonisjs/.github/.github/workflows/typecheck.yml@main

.github/workflows/labels.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Sync labels
2+
on:
3+
workflow_dispatch:
4+
permissions:
5+
issues: write
6+
jobs:
7+
labels:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: EndBug/label-sync@v2
12+
with:
13+
config-file: 'https://raw.githubusercontent.com/thetutlage/static/main/labels.yml'
14+
delete-other-labels: true
15+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: release
2+
on: workflow_dispatch
3+
permissions:
4+
contents: write
5+
id-token: write
6+
jobs:
7+
checks:
8+
uses: ./.github/workflows/checks.yml
9+
release:
10+
needs: checks
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
- name: git config
20+
run: |
21+
git config user.name "${GITHUB_ACTOR}"
22+
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
23+
- name: Init npm config
24+
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
25+
env:
26+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
27+
- run: npm install
28+
- run: npm run release -- --ci
29+
env:
30+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/stale.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: 'Close stale issues and PRs'
2+
on:
3+
schedule:
4+
- cron: '30 0 * * *'
5+
6+
jobs:
7+
stale:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/stale@v9
11+
with:
12+
stale-issue-message: 'This issue has been marked as stale because it has been inactive for more than 21 days. Please reopen if you still need help on this issue'
13+
stale-pr-message: 'This pull request has been marked as stale because it has been inactive for more than 21 days. Please reopen if you still intend to submit this pull request'
14+
close-issue-message: 'This issue has been automatically closed because it has been inactive for more than 4 weeks. Please reopen if you still need help on this issue'
15+
close-pr-message: 'This pull request has been automatically closed because it has been inactive for more than 4 weeks. Please reopen if you still intend to submit this pull request'
16+
days-before-stale: 21
17+
days-before-close: 5

.github/workflows/test.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@ name: test
22
on:
33
- push
44
- pull_request
5+
- workflow_call
6+
57
jobs:
68
test_linux:
79
runs-on: ubuntu-latest
810
strategy:
911
matrix:
10-
node-version: [20.10.0, 21.x]
12+
node-version: ["lts/iron", "lts/jod", "latest"]
1113

1214
steps:
1315
- name: Checkout code
14-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1517

1618
- name: Setup Node.js
17-
uses: actions/setup-node@v3
19+
uses: actions/setup-node@v4
1820
with:
1921
node-version: ${{ matrix.node-version }}
2022

@@ -23,9 +25,3 @@ jobs:
2325

2426
- name: Run tests
2527
run: npm run test:docker
26-
27-
lint:
28-
uses: adonisjs/.github/.github/workflows/lint.yml@main
29-
30-
typecheck:
31-
uses: adonisjs/.github/.github/workflows/typecheck.yml@main

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
"version": "npm run build",
3636
"prepublishOnly": "npm run build",
3737
"lint": "eslint . --ext=.ts",
38-
"typecheck": "tsc --noEmit",
39-
"sync-labels": "github-label-sync --labels .github/labels.json adonisjs/redis"
38+
"typecheck": "tsc --noEmit"
4039
},
4140
"devDependencies": {
4241
"@adonisjs/assembler": "^7.7.0",
@@ -57,7 +56,6 @@
5756
"del-cli": "^5.1.0",
5857
"dotenv": "^16.4.5",
5958
"eslint": "^8.56.0",
60-
"github-label-sync": "^2.3.1",
6159
"husky": "^9.0.11",
6260
"np": "^10.0.6",
6361
"prettier": "^3.3.2",

0 commit comments

Comments
 (0)