Skip to content

Commit

Permalink
Merge pull request #2 from tidbcloud/chore/release-ci
Browse files Browse the repository at this point in the history
chore: set release ci
  • Loading branch information
baurine authored Jun 7, 2024
2 parents cbf83b8 + e329a02 commit 7a8930d
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 8 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Build

on:
push:
branches:
- main
pull_request:
branches:
- main
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 8

- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- name: Install Dependencies
run: pnpm i

- name: Build Package
run: pnpm build

- name: Create Release Pull Request or Publish
uses: changesets/action@v1
with:
commit: 'release: bump versions'
title: 'release: bump versions'
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"prepare": "husky",
"build": "pnpm -r build",
"release": "pnpm -r release"
"release": "changeset publish"
},
"keywords": [
"sql",
Expand Down
3 changes: 1 addition & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"README.md"
],
"scripts": {
"build": "tsc && rollup -c",
"release": "pnpm publish --access public"
"build": "tsc && rollup -c"
},
"keywords": [],
"author": "",
Expand Down
3 changes: 1 addition & 2 deletions packages/extensions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"README.md"
],
"scripts": {
"build": "tsc && rollup -c",
"release": "pnpm publish --access public"
"build": "tsc && rollup -c"
},
"keywords": [],
"author": "",
Expand Down

0 comments on commit 7a8930d

Please sign in to comment.