Skip to content

Commit e93a975

Browse files
authored
Merge pull request #1 from jsrepojs/initial-release
2 parents 9ee1f3a + b0245b6 commit e93a975

File tree

18 files changed

+3065
-0
lines changed

18 files changed

+3065
-0
lines changed

.changeset/config.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": [
4+
"@svitejs/changesets-changelog-github-compact",
5+
{ "repo": "jsrepojs/example-monorepo" }
6+
],
7+
"commit": false,
8+
"fixed": [],
9+
"linked": [],
10+
"access": "public",
11+
"baseBranch": "main",
12+
"updateInternalDependencies": "patch",
13+
"ignore": [],
14+
"privatePackages": {
15+
"tag": true,
16+
"version": true
17+
}
18+
}

.changeset/poor-jobs-buy.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"mono-one": patch
3+
"mono-two": patch
4+
---
5+
6+
chore: initial release

.github/workflows/release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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+
- uses: actions/checkout@v4
16+
- uses: pnpm/action-setup@v4
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: 20
20+
cache: pnpm
21+
22+
- name: Install dependencies
23+
run: pnpm install
24+
25+
- name: Create Release Pull Request
26+
id: changesets
27+
uses: changesets/action@v1
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Check if @example/mono-one was published
32+
id: mono_one_published
33+
run: |
34+
echo '${{ steps.changesets.outputs.publishedPackages }}' | \
35+
jq -e '.[] | select(.name == "mono-one")' > /dev/null && \
36+
echo "was_published=true" >> $GITHUB_OUTPUT || \
37+
echo "was_published=false" >> $GITHUB_OUTPUT
38+
shell: bash
39+
40+
- name: Check if @example/mono-two was published
41+
id: mono_two_published
42+
run: |
43+
echo '${{ steps.changesets.outputs.publishedPackages }}' | \
44+
jq -e '.[] | select(.name == "mono-two")' > /dev/null && \
45+
echo "was_published=true" >> $GITHUB_OUTPUT || \
46+
echo "was_published=false" >> $GITHUB_OUTPUT
47+
shell: bash
48+
49+
- name: Publish mono-one
50+
if: steps.mono_one_published.outputs.was_published == 'true'
51+
run: pnpm release:mono-one
52+
53+
- name: Publish mono-two
54+
if: steps.mono_two_published.outputs.was_published == 'true'
55+
run: pnpm release:mono-two

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
# example-monorepo
2+
23
An example of how to release multiple registries to jsrepo.com from the same repository.
4+
5+
## registries
6+
- [@example/mono-one](https://www.jsrepo.com/@example/mono-one)
7+
- [@example/mono-two](https://www.jsrepo.com/@example/mono-two)

biome.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3+
"vcs": {
4+
"enabled": false,
5+
"clientKind": "git",
6+
"useIgnoreFile": false
7+
},
8+
"files": {
9+
"ignoreUnknown": false,
10+
"ignore": []
11+
},
12+
"formatter": {
13+
"enabled": true,
14+
"indentStyle": "tab"
15+
},
16+
"organizeImports": {
17+
"enabled": true
18+
},
19+
"linter": {
20+
"enabled": true,
21+
"rules": {
22+
"recommended": true
23+
}
24+
},
25+
"javascript": {
26+
"formatter": {
27+
"quoteStyle": "double"
28+
}
29+
}
30+
}

package.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "example-monorepo",
3+
"version": "0.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"format": "biome format --write",
8+
"lint": "biome lint --write",
9+
"check": "biome check",
10+
"build:mono-one": "pnpm jsrepo build --no-output --preview --cwd ./registries/mono-one",
11+
"release:mono-one": "pnpm -F mono-one release:registry",
12+
"build:mono-two": "pnpm jsrepo build --no-output --preview --cwd ./registries/mono-two",
13+
"release:mono-two": "pnpm -F mono-two release:registry",
14+
"build:registries": "pnpm build:mono-one && pnpm build:mono-two"
15+
},
16+
"keywords": [],
17+
"author": "",
18+
"license": "ISC",
19+
"packageManager": "[email protected]",
20+
"devDependencies": {
21+
"@biomejs/biome": "^1.9.4",
22+
"@changesets/cli": "^2.29.3",
23+
"@svitejs/changesets-changelog-github-compact": "^1.2.0",
24+
"concurrently": "^9.1.2",
25+
"jsrepo": "^2.0.2",
26+
"typescript": "^5.8.3"
27+
}
28+
}

0 commit comments

Comments
 (0)