Skip to content

Commit 2ba3df5

Browse files
committed
add release action
1 parent 5d9a0aa commit 2ba3df5

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/release-pack.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Release npm tarballs
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
- "v*.*"
8+
- "v*"
9+
10+
jobs:
11+
pack-and-release:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Setup Node
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 22
26+
cache: yarn
27+
28+
- name: Install dependencies
29+
run: yarn install --frozen-lockfile
30+
31+
- name: Build & pack docusaurus-plugin-openapi-docs
32+
working-directory: packages/docusaurus-plugin-openapi-docs
33+
run: |
34+
yarn build || npm run build
35+
npm pack
36+
37+
- name: Build & pack docusaurus-theme-openapi-docs
38+
working-directory: packages/docusaurus-theme-openapi-docs
39+
run: |
40+
yarn build || npm run build
41+
npm pack
42+
43+
- name: Create GitHub Release & upload tarballs
44+
uses: softprops/action-gh-release@v2
45+
with:
46+
files: |
47+
packages/docusaurus-plugin-openapi-docs/*.tgz
48+
packages/docusaurus-theme-openapi-docs/*.tgz
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)