Skip to content

Commit f3f527e

Browse files
committed
build(release): configure semantic release and update package settings
1 parent cbf76a0 commit f3f527e

File tree

4 files changed

+3508
-290
lines changed

4 files changed

+3508
-290
lines changed

.github/workflows/release.yml

+12-15
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@ name: Release
22

33
on:
44
push:
5-
tags:
6-
- "v*"
5+
branches:
6+
- main
77

88
jobs:
99
release:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
issues: write
14+
pull-requests: write
15+
packages: write
1116
steps:
1217
- uses: actions/checkout@v4
1318
with:
@@ -20,7 +25,8 @@ jobs:
2025
with:
2126
node-version: "20"
2227
cache: "yarn"
23-
registry-url: "https://registry.npmjs.org"
28+
registry-url: "https://npm.pkg.github.com"
29+
scope: "@exadev"
2430

2531
- name: Install dependencies
2632
run: yarn install --immutable
@@ -31,17 +37,8 @@ jobs:
3137
- name: Run tests
3238
run: yarn test
3339

34-
- name: Create GitHub Release
35-
uses: softprops/action-gh-release@v2
36-
with:
37-
generate_release_notes: true
38-
files: |
39-
dist/**/*
40+
- name: Release
4041
env:
4142
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42-
43-
# Uncomment to publish to npm
44-
# - name: Publish to npm
45-
# run: npm publish
46-
# env:
47-
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
43+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
run: npx semantic-release

.releaserc.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"branches": [
3+
"main"
4+
],
5+
"plugins": [
6+
"@semantic-release/commit-analyzer",
7+
"@semantic-release/release-notes-generator",
8+
"@semantic-release/changelog",
9+
"@semantic-release/npm",
10+
"@semantic-release/github",
11+
"@semantic-release/git"
12+
]
13+
}

package.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44
},
55
"description": "A client library for interacting with the Breadboard API",
66
"devDependencies": {
7+
"@semantic-release/changelog": "^6.0.3",
8+
"@semantic-release/git": "^10.0.1",
79
"@types/fs-extra": "^11.0.4",
810
"@types/inquirer": "^9.0.7",
911
"@types/jest": "^29.5.14",
1012
"@types/node": "^20.17.23",
1113
"jest": "^29.7.0",
14+
"semantic-release": "^23.0.2",
1215
"ts-jest": "^29.2.6",
1316
"ts-node": "^10.9.2",
1417
"typescript": "^5.8.2",
@@ -21,7 +24,7 @@
2124
],
2225
"license": "UNLICENSED",
2326
"main": "dist/index.js",
24-
"name": "breadboard-client",
27+
"name": "@exadev/breadboard-client",
2528
"packageManager": "[email protected]",
2629
"scripts": {
2730
"build": "tsc",
@@ -39,5 +42,8 @@
3942
},
4043
"type": "module",
4144
"types": "dist/index.d.ts",
42-
"version": "1.0.0"
45+
"publishConfig": {
46+
"registry": "https://npm.pkg.github.com",
47+
"access": "public"
48+
}
4349
}

0 commit comments

Comments
 (0)