Skip to content

Commit b4e23f0

Browse files
committed
chore: add release-it support for apsara
1 parent b1041cd commit b4e23f0

File tree

7 files changed

+1012
-720
lines changed

7 files changed

+1012
-720
lines changed

.changeset/config.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,17 @@ name: Release
22

33
on:
44
push:
5-
branches:
6-
- main
7-
paths:
8-
- '.changeset/**'
9-
- '.github/workflows/release.yml'
5+
tags:
6+
- "v*.*.*"
107
workflow_dispatch:
118

12-
concurrency: ${{ github.workflow }}-${{ github.ref }}
13-
149
jobs:
1510
release:
1611
name: Release
1712
runs-on: ubuntu-latest
1813
timeout-minutes: 10
1914
steps:
20-
- name: Checkout Repo
15+
- name: Checkout 🛎️
2116
uses: actions/checkout@v3
2217
with:
2318
fetch-depth: 0
@@ -27,21 +22,29 @@ jobs:
2722
with:
2823
version: 8.6.9
2924

30-
- name: Setup Node.js 18.x
25+
- name: Setup Node.js 20.x
3126
uses: actions/setup-node@v2
3227
with:
33-
node-version: 18.x
28+
node-version: 20.x
3429

35-
- name: Install Dependencies
30+
- name: Install Dependencies 🔧
3631
run: pnpm i
3732

38-
- name: Create Release Pull Request or Publish to npm
39-
id: changesets
40-
uses: changesets/action@v1
41-
with:
42-
# This expects you to have a script called release which does a build for your packages and calls changeset publish
43-
version: pnpm ci:version
44-
publish: pnpm ci:release
33+
- name: Build Step 🔧
34+
env:
35+
CI: ""
36+
run: npm run ci:build
37+
38+
- name: Create .npmrc
39+
run: |
40+
cat << EOF > "$HOME/.npmrc"
41+
//registry.npmjs.org/:_authToken=$NPM_TOKEN
42+
EOF
43+
env:
44+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
45+
46+
- name: Run Release 🚀
47+
run: npm run ci:release
4548
env:
4649
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4750
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
{
22
"private": true,
33
"scripts": {
4-
"changeset": "changeset",
54
"build": "turbo build --filter=@raystack/apsara",
65
"dev": "turbo dev --filter=@raystack/apsara",
76
"lint": "turbo lint --filter=@raystack/apsara",
87
"clean": "turbo clean --filter=@raystack/apsara",
98
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
10-
"ci:version": "changeset version",
11-
"ci:release": "turbo build --filter=@raystack/apsara... && changeset publish"
9+
"ci:build": "turbo build --filter=@raystack/apsara",
10+
"ci:release": "turbo release --filter=@raystack/apsara -- --ci --no-increment"
1211
},
1312
"devDependencies": {
14-
"@changesets/cli": "^2.26.2",
1513
"@parcel/packager-ts": "2.9.2",
1614
"@parcel/transformer-typescript-types": "2.9.2",
1715
"@turbo/gen": "^1.9.7",

packages/raystack/.release-it.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"git": {
3+
"requireBranch": false,
4+
"getLatestTagFromAllRefs": true,
5+
"push": false,
6+
"commit": false,
7+
"tag": false
8+
},
9+
"github": {
10+
"tag": false,
11+
"release": false
12+
},
13+
"npm": {
14+
"ignoreVersion": true
15+
}
16+
}

packages/raystack/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"build": "rollup --config",
2222
"dev": "rollup --config --watch",
2323
"lint": "eslint \"**/*.ts*\"",
24+
"release": "release-it",
2425
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist && rm -rf react/dist",
2526
"test": "echo \"Error: no test specified\" && exit 0"
2627
},
@@ -63,5 +64,8 @@
6364
"tsconfig": "workspace:*",
6465
"typescript": "4.7",
6566
"usehooks-ts": "^2.9.1"
67+
},
68+
"dependencies": {
69+
"release-it": "^16.2.1"
6670
}
6771
}

0 commit comments

Comments
 (0)