Skip to content

Commit b40986f

Browse files
authored
ci: improve release script (#862)
1 parent f9f4167 commit b40986f

File tree

7 files changed

+310
-45
lines changed

7 files changed

+310
-45
lines changed

.github/workflows/create-gh-release.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,6 @@ jobs:
1818
with:
1919
fetch-depth: 0
2020

21-
# - name: Generate changelog
22-
# uses: orhun/git-cliff-action@v4
23-
# env:
24-
# OUTPUT: CHANGELOG.md
25-
# GITHUB_REPO: ${{ github.repository }}
26-
27-
# - name: Update changelog
28-
# uses: stefanzweifel/git-auto-commit-action@v5
29-
# with:
30-
# file_pattern: 'CHANGELOG.md'
31-
# commit_message: "chore: update changelog"
32-
# branch: main
33-
3421
- name: Generate release notes
3522
uses: orhun/git-cliff-action@v4
3623
id: generate_release_notes
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release JavaScript packages
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Bun
16+
uses: oven-sh/setup-bun@v2
17+
18+
- name: Setup Node for npm publishing
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: current
22+
23+
- name: Install dependencies
24+
run: bun install
25+
26+
- name: Run tests
27+
run: bun run test
28+
29+
- name: Build packages
30+
run: bun run build
31+
32+
- name: Publish packages
33+
env:
34+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
35+
run: |
36+
for package in packages/*; do
37+
if [ -d "$package" ] && [ -f "$package/package.json" ]; then
38+
cd "$package"
39+
echo "Publishing package in $package"
40+
bun publish --access public
41+
cd ../..
42+
fi
43+
done

0 commit comments

Comments
 (0)