Skip to content

Commit 397ce07

Browse files
feat: add publish config
1 parent 23da45b commit 397ce07

File tree

11 files changed

+146
-12
lines changed

11 files changed

+146
-12
lines changed

.changeset/config.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3-
"changelog": "@changesets/cli/changelog",
3+
"changelog": ["@changesets/changelog-github", { "repo": "openapi-ui/nodejs-openapi-ui" }],
44
"commit": false,
55
"fixed": [],
66
"linked": [],
7-
"access": "restricted",
7+
"access": "public",
88
"baseBranch": "main",
99
"updateInternalDependencies": "patch",
1010
"ignore": []

.changeset/gold-dryers-complain.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@openapi-ui/express-openapi-ui": minor
3+
"@openapi-ui/nestjs-openapi-ui": minor
4+
"@openapi-ui/hono-openapi-ui": minor
5+
---
6+
7+
init publish

.github/dependabot.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"

.github/workflows/release.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Release CI
2+
on:
3+
push:
4+
branches:
5+
- release
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Use Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '18.x'
19+
registry-url: 'https://registry.npmjs.org'
20+
21+
- name: Cache
22+
id: cache-dependencies
23+
uses: actions/cache@v4
24+
with:
25+
path: |
26+
**/node_modules
27+
key: ${{runner.OS}}-${{hashFiles('**/pnpm-lock.yaml')}}
28+
29+
- name: Install pnpm
30+
run: npm install -g pnpm
31+
32+
- name: Installing Dependencies
33+
if: steps.cache-dependencies.outputs.cache-hit != 'true'
34+
run: pnpm install
35+
36+
- name: Running Test
37+
run: pnpm run test
38+
39+
- name: Running Build
40+
run: pnpm run build
41+
42+
- name: Create Release Pull Request or Publish
43+
id: changesets
44+
uses: changesets/action@v1
45+
with:
46+
version: pnpm run version
47+
publish: pnpm run publish
48+
commit: 'chore(release): changesets versioning & publish'
49+
title: 'Changesets: versioning & publish'
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GHP_TOKEN }}
52+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/test.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Test CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
workflow_dispatch:
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Use Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '18.x'
22+
registry-url: 'https://registry.npmjs.org'
23+
24+
- name: Cache
25+
id: cache-dependencies
26+
uses: actions/cache@v4
27+
with:
28+
path: |
29+
**/node_modules
30+
key: ${{runner.OS}}-${{hashFiles('**/pnpm-lock.yaml')}}
31+
32+
- name: Install pnpm
33+
run: npm install -g pnpm
34+
35+
- name: Installing Dependencies
36+
if: steps.cache-dependencies.outputs.cache-hit != 'true'
37+
run: pnpm install
38+
39+
- name: Running Test
40+
run: pnpm run test

package.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66
"author": "rookie-luochao",
77
"license": "MIT",
88
"scripts": {
9-
"build:packages": "pnpm --filter './packages/**' build",
10-
"build:nestjs": "pnpm --filter nestjs-openapi-ui build",
11-
"bump": "pnpm run test && pnpm changeset version",
9+
"build": "pnpm --filter './packages/**' run build",
10+
"changeset": "changeset",
11+
"version": "changeset version",
12+
"publish": "changeset publish",
1213
"test": "vitest",
1314
"prepare": "husky"
1415
},
1516
"devDependencies": {
17+
"@changesets/changelog-github": "^0.5.0",
1618
"@changesets/cli": "^2.27.1",
1719
"@commitlint/cli": "^19.3.0",
1820
"@commitlint/config-conventional": "^19.2.2",

packages/express-openapi-ui/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@openapi-ui/express-openapi-ui",
33
"description": "A middleware for using the OpenAPI-UI with Express",
4-
"version": "0.1.0",
4+
"version": "0.0.0",
55
"author": "rookie-luochao",
66
"homepage": "https://github.com/openapi-ui/nodejs-openapi-ui",
77
"bugs": "https://github.com/openapi-ui/nodejs-openapi-ui/issues",

packages/hono-openapi-ui/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@openapi-ui/hono-openapi-ui",
33
"description": "A middleware for using the OpenAPI-UI with Hono",
4-
"version": "0.1.0",
4+
"version": "0.0.0",
55
"author": "rookie-luochao",
66
"homepage": "https://github.com/openapi-ui/nodejs-openapi-ui",
77
"bugs": "https://github.com/openapi-ui/nodejs-openapi-ui/issues",

packages/nestjs-openapi-ui/.gitignore

-4
This file was deleted.

packages/nestjs-openapi-ui/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@openapi-ui/nestjs-openapi-ui",
33
"description": "A middleware for using the OpenAPI-UI with NestJS",
4-
"version": "0.1.0",
4+
"version": "0.0.0",
55
"author": "rookie-luochao",
66
"homepage": "https://github.com/openapi-ui/nodejs-openapi-ui",
77
"bugs": "https://github.com/openapi-ui/nodejs-openapi-ui/issues",

pnpm-lock.yaml

+31
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)