Skip to content

Commit 4d12e55

Browse files
committed
feat: add release action
1 parent 7abb2fe commit 4d12e55

3 files changed

Lines changed: 51 additions & 2 deletions

File tree

.github/release.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
jobs:
11+
release:
12+
name: Release
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Repo
16+
uses: actions/checkout@v3
17+
18+
- name: Setup Bun
19+
uses: oven-sh/setup-bun@v2
20+
21+
- name: Install Dependencies
22+
run: bun install
23+
24+
- name: Create Release Pull Request or Publish to npm
25+
id: changesets
26+
uses: changesets/action@v1
27+
with:
28+
publish: bun run release
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
32+
33+
- name: Send a Slack notification if a publish happens
34+
if: steps.changesets.outputs.published == 'true'
35+
# You can do something when a publish happens.
36+
run: echo "A new version of ${GITHUB_REPOSITORY} was published!"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"format-and-lint": "biome check .",
88
"format-and-lint:fix": "biome check . --write",
99
"check-types": "turbo run check-types",
10-
"publish-packages": "turbo run format-and-lint test build && changeset version && changeset publish"
10+
"release": "turbo run format-and-lint test build && changeset version && changeset publish"
1111
},
1212
"devDependencies": {
1313
"@biomejs/biome": "2.2.4",

packages/core/package.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
11
{
22
"name": "@foldcms/core",
33
"version": "0.1.0",
4-
"module": "index.ts",
54
"type": "module",
5+
"exports": {
6+
"./collections": {
7+
"types": "./dist/collections.d.ts",
8+
"import": "./dist/collections.js"
9+
},
10+
"./cms": {
11+
"types": "./dist/cms.d.ts",
12+
"import": "./dist/cms.js"
13+
},
14+
"./loaders": {
15+
"types": "./dist/loaders.d.ts",
16+
"import": "./dist/loaders.js"
17+
}
18+
},
619
"private": false,
720
"scripts": {
821
"build": "tsup",

0 commit comments

Comments
 (0)