Skip to content

Commit 0c46147

Browse files
committed
ci: update
1 parent 50034b3 commit 0c46147

File tree

6 files changed

+106
-84
lines changed

6 files changed

+106
-84
lines changed

Diff for: .github/cache/action.yml

-33
This file was deleted.

Diff for: .github/workflows/ci.yml

+66-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,78 @@
11
name: CI
22

3-
on: [pull_request]
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
pull_request:
9+
branches:
10+
- main
411

512
concurrency:
613
group: ${{ github.workflow }}-${{ github.ref }}
714
cancel-in-progress: true
815

916
jobs:
10-
build:
17+
lint:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Install pnpm
23+
uses: pnpm/action-setup@v4
24+
25+
- name: Set node
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: lts/*
29+
30+
- name: Install
31+
run: pnpm install
32+
33+
- name: Lint
34+
run: pnpm lint
35+
36+
typecheck:
1137
runs-on: ubuntu-latest
1238
steps:
13-
- name: Checkout Repo
14-
uses: actions/checkout@v4
39+
- uses: actions/checkout@v4
40+
41+
- name: Install pnpm
42+
uses: pnpm/action-setup@v4
43+
44+
- name: Set node
45+
uses: actions/setup-node@v4
46+
with:
47+
node-version: lts/*
48+
49+
- name: Install
50+
run: pnpm install
51+
52+
- name: Build
53+
run: pnpm build
54+
55+
- name: Typecheck
56+
run: pnpm typecheck
57+
58+
test:
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v4
62+
63+
- name: Install pnpm
64+
uses: pnpm/action-setup@v4
65+
66+
- name: Set node
67+
uses: actions/setup-node@v4
68+
with:
69+
node-version: lts/*
70+
71+
- name: Install
72+
run: pnpm install
1573

16-
- name: Setup Continuous integration
17-
uses: ./.github/cache
74+
- name: Build
75+
run: pnpm build
1876

19-
- run: pnpm run lint && pnpm run build
77+
- name: Test
78+
run: pnpm test

Diff for: .github/workflows/deploy-docs.yml

+15-33
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,30 @@ env:
66

77
on:
88
push:
9-
branches:
10-
- release
9+
branches: [main]
10+
11+
workflow_dispatch:
1112

12-
# This is what will cancel the workflow
1313
concurrency:
1414
group: ${{ github.workflow }}-${{ github.ref }}
1515
cancel-in-progress: true
1616

1717
jobs:
18-
Deploy-Deployment:
18+
deploy:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- name: Checkout Repo
22-
uses: actions/checkout@v4
21+
- uses: actions/checkout@v4
22+
23+
- name: Install pnpm
24+
uses: pnpm/action-setup@v4
2325

24-
- name: Setup Continuous integration
25-
uses: ./.github/cache
26+
- name: Set node
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: lts/*
30+
31+
- name: Install
32+
run: pnpm install
2633

2734
- name: Install Vercel CLI
2835
run: pnpm install --global vercel@latest
@@ -32,28 +39,3 @@ jobs:
3239
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
3340
- name: Deploy Project Artifacts to Vercel
3441
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
35-
36-
# - name: Notify Discord
37-
# if: failure()
38-
# uses: hunghg255/action-notifications@master
39-
# with:
40-
# discord_webhook: ${{ secrets.CI_CD_DISCORD_URL }}
41-
# title: "Deploy dev failed"
42-
# qrcode: https://dev-web.degenpark.io
43-
# description: "Test here: https://dev-web.degenpark.io"
44-
45-
# notifification:
46-
# needs: Deploy-Production
47-
# runs-on: ubuntu-latest
48-
# permissions:
49-
# packages: write
50-
# contents: read
51-
52-
# steps:
53-
# - uses: hunghg255/action-notifications@master
54-
# if: always()
55-
# with:
56-
# discord_webhook: ${{ secrets.CI_CD_DISCORD_URL }}
57-
# title: "Deploy dev successfully"
58-
# qrcode: https://dev-web.degenpark.io
59-
# description: "Test here: https://dev-web.degenpark.io"

Diff for: .github/workflows/release.yml

+21-8
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,31 @@ concurrency:
1414

1515
jobs:
1616
release:
17+
permissions:
18+
id-token: write
19+
contents: write
1720
runs-on: ubuntu-latest
1821
steps:
19-
- name: Checkout Repo
20-
uses: actions/checkout@v4
22+
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
2125

22-
- name: Setup Continuous integration
23-
uses: ./.github/cache
26+
- name: Install pnpm
27+
uses: pnpm/action-setup@v4
2428

25-
- run: pnpm run publish
26-
env:
27-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
29+
- name: Set node
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: lts/*
33+
registry-url: https://registry.npmjs.org/
34+
35+
- name: Install
36+
run: pnpm install
2837

29-
- run: pnpm dlx changeloggithub@latest
38+
- run: npx changeloggithub@latest
3039
env:
3140
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
41+
42+
- run: pnpm run publish
43+
env:
44+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Diff for: docs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"dependencies": {
1212
"@shikijs/transformers": "^1.10.3",
13-
"js-utils-es": "^1.0.7",
13+
"js-utils-es": "workspace:*",
1414
"prettier": "^3.3.2",
1515
"shiki": "^1.10.3"
1616
},

Diff for: package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,13 @@
199199
"format": "prettier --write .",
200200
"prepare": "git-scm-hooks",
201201
"prepublishOnly": "npm run build",
202-
"release": "bumpp --commit --push --tag && npm publish",
202+
"release": "bumpp --commit --push --tag",
203203
"docs:dev": "pnpm run -C ./docs dev",
204204
"docs:preview": "pnpm run -C ./docs preview",
205205
"docs:build": "pnpm run -C ./docs build",
206206
"verify-commit": "verify-commit-msg",
207-
"gen-changelog": "esno ./scripts/genFuncUtils.ts && esno ./scripts/changelog.ts"
207+
"gen-changelog": "esno ./scripts/genFuncUtils.ts && esno ./scripts/changelog.ts",
208+
"typecheck": "tsc --noEmit"
208209
},
209210
"devDependencies": {
210211
"@antfu/eslint-config": "^2.22.0",

0 commit comments

Comments
 (0)