Skip to content

Commit 8ee0ca1

Browse files
committed
feat: setup release pipeline
Signed-off-by: seven <zilisheng1996@gmail.com>
1 parent 5dd19fb commit 8ee0ca1

File tree

2 files changed

+65
-2
lines changed

2 files changed

+65
-2
lines changed

.github/workflows/release.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: release
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
permissions:
8+
id-token: write
9+
contents: write
10+
11+
jobs:
12+
release:
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: [ ubuntu-latest ]
17+
node-version: [ 20.x ]
18+
19+
runs-on: ${{ matrix.os }}
20+
timeout-minutes: 20
21+
22+
steps:
23+
- name: Github checkout
24+
uses: actions/checkout@v4
25+
if: matrix.os == 'ubuntu-latest'
26+
- name: Use Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
registry-url: 'https://registry.npmjs.org'
31+
- name: Install dependencies
32+
run: npm ci
33+
- run: npm run lint:check
34+
- run: npm audit --audit-level=critical
35+
- run: npm run test:ci
36+
- name: Upload coverage reports to Codecov
37+
uses: codecov/codecov-action@v4
38+
with:
39+
token: ${{ secrets.CODECOV_TOKEN }}
40+
verbose: true
41+
fail_ci_if_error: true
42+
- name: build 🔧
43+
run: npm run build
44+
- name: Generate changelog
45+
uses: jaywcjlove/changelog-generator@main
46+
id: changelog
47+
with:
48+
token: ${{ secrets.GITHUB_TOKEN }}
49+
- name: Build Release
50+
uses: jaywcjlove/create-tag-action@main
51+
id: tag_release
52+
with:
53+
release: true
54+
token: ${{ secrets.GITHUB_TOKEN }}
55+
body: |
56+
${{ steps.changelog.outputs.compareurl }}
57+
58+
${{ steps.changelog.outputs.changelog }}
59+
- name: Publish package on NPM 📦
60+
if: steps.tag_release.outputs.successful == 'true'
61+
run: npm publish --provenance --access public
62+
env:
63+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "@geek-fun/serverless-adapter",
33
"version": "0.0.0",
4-
"description": "Adapter for web frame work express, koa, springboot to run in serverless function as backend of apigateway corss multi cloud provider like aliyun, huawei\n\n",
5-
"homepage": "https://serverlessinsight.geekfun.club",
4+
"description": "Adapter for web frame work express, koa, springboot to run in serverless function as backend of apigateway cross multi cloud provider like aliyun, huawei",
5+
"homepage": "https://www.geekfun.club/",
66
"main": "dist/src/index.js",
77
"types": "dist/src/index.d.ts",
88
"scripts": {

0 commit comments

Comments
 (0)