Skip to content

Commit 0b9a54f

Browse files
committed
🎉 exp: ci publish
1 parent bc0f7be commit 0b9a54f

File tree

2 files changed

+63
-2
lines changed

2 files changed

+63
-2
lines changed

.github/workflows/publish.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Publish Experimental
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
defaults:
8+
run:
9+
shell: bash
10+
11+
env:
12+
# Enable debug logging for actions
13+
ACTIONS_RUNNER_DEBUG: true
14+
15+
jobs:
16+
changelog:
17+
name: 'Generate Changelog'
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- uses: oven-sh/setup-bun@v1
26+
with:
27+
bun-version: latest
28+
29+
- name: Generate Changelog
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
run: bunx changelogithub --no-group
33+
continue-on-error: true
34+
35+
publish-npm:
36+
name: 'Publish: npm Registry'
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: 'Checkout'
40+
uses: actions/checkout@v4
41+
42+
- name: 'Setup Bun'
43+
uses: oven-sh/setup-bun@v1
44+
with:
45+
bun-version: latest
46+
registry-url: "https://registry.npmjs.org"
47+
48+
- name: Install packages
49+
run: bun install
50+
51+
- name: Build code
52+
run: bun run build
53+
54+
- name: Test
55+
run: bun run test
56+
57+
- name: 'Publish'
58+
env:
59+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
60+
run: |
61+
npm publish --access=public

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@elysiajs/static",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"license": "MIT",
55
"scripts": {
66
"dev": "bun run --hot example/index.ts",
@@ -51,4 +51,4 @@
5151
"bugs": "https://github.com/elysiajs/elysia-static/issues",
5252
"description": "Plugin for Elysia for serving static folder",
5353
"homepage": "https://github.com/elysiajs/elysia-static"
54-
}
54+
}

0 commit comments

Comments
 (0)