Skip to content

Commit 50a3a79

Browse files
authored
Merge pull request #53 from zenstackhq/dev
merge dev to main (v3.0.0-alpha.6)
2 parents ca05f6d + 5c39145 commit 50a3a79

File tree

17 files changed

+125
-21
lines changed

17 files changed

+125
-21
lines changed

.github/workflows/bump-version.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ permissions:
1010
jobs:
1111
bump-version:
1212
runs-on: ubuntu-latest
13+
if: github.ref == 'refs/heads/dev'
1314

1415
steps:
1516
- name: Checkout
@@ -32,13 +33,14 @@ jobs:
3233
run: pnpm install --frozen-lockfile
3334

3435
- name: Bump version
36+
id: bump
3537
run: pnpm run bump-version
3638

3739
- name: Create PR
3840
uses: peter-evans/create-pull-request@v7
3941
with:
40-
commit-message: 'chore: bump version'
41-
title: '[CI] Bump version'
42+
commit-message: 'chore: bump version ${{ steps.bump.outputs.new_version }}'
43+
title: '[CI] Bump version ${{ steps.bump.outputs.new_version }}'
4244
body: Automated changes for bumping version
4345
branch: chore/ci-bump-version
4446
branch-suffix: timestamp
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Publish and Release
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
publish-and-release:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Install pnpm
21+
uses: pnpm/action-setup@v2
22+
with:
23+
version: 10.12.1
24+
25+
- name: Use Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 20.x
29+
cache: 'pnpm'
30+
registry-url: 'https://registry.npmjs.org'
31+
32+
- name: Install dependencies
33+
run: pnpm install --frozen-lockfile
34+
35+
- name: Build
36+
run: pnpm run build
37+
38+
- name: Get version from package.json
39+
id: version
40+
run: |
41+
VERSION=$(node -p "require('./package.json').version")
42+
echo "version=$VERSION" >> $GITHUB_OUTPUT
43+
echo "tag=v$VERSION" >> $GITHUB_OUTPUT
44+
45+
- name: Publish packages
46+
run: pnpm run publish-all
47+
env:
48+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
49+
50+
- name: Generate changelog
51+
id: changelog
52+
run: |
53+
PREVIOUS_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
54+
55+
if [ -z "$PREVIOUS_TAG" ]; then
56+
CHANGELOG=$(git log --oneline --no-merges --format="* %s" HEAD)
57+
else
58+
CHANGELOG=$(git log --oneline --no-merges --format="* %s" ${PREVIOUS_TAG}..HEAD)
59+
fi
60+
61+
if [ -z "$CHANGELOG" ]; then
62+
CHANGELOG="* Automated release"
63+
fi
64+
65+
echo "changelog<<EOF" >> $GITHUB_OUTPUT
66+
echo "$CHANGELOG" >> $GITHUB_OUTPUT
67+
echo "EOF" >> $GITHUB_OUTPUT
68+
69+
- name: Create GitHub Release
70+
uses: softprops/action-gh-release@v2
71+
env:
72+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
with:
74+
tag_name: ${{ steps.version.outputs.tag }}
75+
name: ZenStack Release ${{ steps.version.outputs.tag }}
76+
body: |
77+
## Changes in this release
78+
79+
${{ steps.changelog.outputs.changelog }}
80+
draft: true
81+
prerelease: true

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zenstack-v3",
3-
"version": "3.0.0-alpha.5",
3+
"version": "3.0.0-alpha.6",
44
"description": "ZenStack",
55
"packageManager": "[email protected]",
66
"scripts": {

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publisher": "zenstack",
44
"displayName": "ZenStack CLI",
55
"description": "FullStack database toolkit with built-in access control and automatic API generation.",
6-
"version": "3.0.0-alpha.5",
6+
"version": "3.0.0-alpha.6",
77
"type": "module",
88
"author": {
99
"name": "ZenStack Team"

packages/common-helpers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@zenstackhq/common-helpers",
3-
"version": "3.0.0-alpha.5",
3+
"version": "3.0.0-alpha.6",
44
"description": "ZenStack Common Helpers",
55
"type": "module",
66
"scripts": {

packages/create-zenstack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-zenstack",
3-
"version": "3.0.0-alpha.5",
3+
"version": "3.0.0-alpha.6",
44
"description": "Create a new ZenStack project",
55
"type": "module",
66
"scripts": {

packages/eslint-config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@zenstackhq/eslint-config",
3-
"version": "3.0.0-alpha.5",
3+
"version": "3.0.0-alpha.6",
44
"type": "module",
55
"private": true,
66
"license": "MIT"

packages/ide/vscode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "zenstack",
33
"publisher": "zenstack",
4-
"version": "3.0.2",
4+
"version": "3.0.3",
55
"displayName": "ZenStack Language Tools",
66
"description": "VSCode extension for ZenStack ZModel language",
77
"private": true,

packages/language/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@zenstackhq/language",
33
"description": "ZenStack ZModel language specification",
4-
"version": "3.0.0-alpha.5",
4+
"version": "3.0.0-alpha.6",
55
"license": "MIT",
66
"author": "ZenStack Team",
77
"files": [

packages/runtime/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@zenstackhq/runtime",
3-
"version": "3.0.0-alpha.5",
3+
"version": "3.0.0-alpha.6",
44
"description": "ZenStack Runtime",
55
"type": "module",
66
"scripts": {

0 commit comments

Comments
 (0)