Skip to content

Commit 2c38caa

Browse files
authored
Merge pull request #1 from com-pas/task/publish-packages-to-npm
fix: publish packages to npm
2 parents e43ee6a + 21fa2ac commit 2c38caa

21 files changed

Lines changed: 137 additions & 52 deletions

.github/workflows/build-and-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ jobs:
4040
with:
4141
branch: master
4242
folder: packages/distribution/build
43-
repository-name: openscd/openscd.github.io
43+
repository-name: com-pas/openscd.github.io
4444
ssh-key: ${{ secrets.DEPLOY_KEY }}

.github/workflows/release-please.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
id: release
1717
with:
1818
release-type: node
19-
command: manifest
2019
token: ${{ secrets.GITHUB_TOKEN }}
2120
# The logic below handles the npm publication:
2221
- uses: actions/checkout@v4
@@ -32,7 +31,37 @@ jobs:
3231
if: ${{ steps.release.outputs.release_created }}
3332
- run: npm run build
3433
if: ${{ steps.release.outputs.release_created }}
35-
- run: cd packages/core && npm publish --access public
34+
35+
- name: Publish core to npm
36+
run: cd packages/core && npm publish --access public
37+
env:
38+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
39+
if: ${{ steps.release.outputs.release_created }}
40+
continue-on-error: true
41+
42+
- name: Publish forms to npm
43+
run: cd packages/forms && npm publish --access public
44+
env:
45+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
46+
if: ${{ steps.release.outputs.release_created }}
47+
continue-on-error: true
48+
49+
- name: Publish xml to npm
50+
run: cd packages/xml && npm publish --access public
51+
env:
52+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
53+
if: ${{ steps.release.outputs.release_created }}
54+
continue-on-error: true
55+
56+
- name: Publish plugins to npm
57+
run: cd packages/plugins && npm publish --access public
58+
env:
59+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
60+
if: ${{ steps.release.outputs.release_created }}
61+
continue-on-error: true
62+
63+
- name: Publish open-scd to npm
64+
run: cd packages/openscd && npm publish --access public
3665
env:
3766
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
3867
if: ${{ steps.release.outputs.release_created }}

package-lock.json

Lines changed: 43 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/addons/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@openscd/addons",
2+
"name": "@compas-oscd/addons",
33
"version": "0.34.0",
44
"repository": "https://github.com/openscd/open-scd.git",
55
"directory": "packages/addons",
@@ -20,7 +20,7 @@
2020
],
2121
"dependencies": {
2222
"lit": "^2.2.7",
23-
"@openscd/core": "*"
23+
"@openscd/core": "npm:@compas-oscd/core@*"
2424
},
2525
"//": {
2626
"clean": "rimraf build",
@@ -133,4 +133,4 @@
133133
],
134134
"commitUrlFormat": "https://github.com/openscd/open-scd/commits/{{hash}}"
135135
}
136-
}
136+
}

packages/addons/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@openscd/addons",
2+
"name": "@compas-oscd/addons",
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"projectType": "library",
55
"sourceRoot": "packages/addons/src",

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@openscd/core",
2+
"name": "@compas-oscd/core",
33
"version": "0.1.4",
44
"description": "The core editor component of open-scd, without any extensions pre-installed.",
55
"author": "Open-SCD",

packages/core/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@openscd/core",
2+
"name": "@compas-oscd/core",
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"projectType": "library",
55
"sourceRoot": "packages/core/src",

packages/distribution/project.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,14 @@
33
"$schema": "../../node_modules/nx/schemas/project-schema.json",
44
"projectType": "application",
55
"sourceRoot": "packages/distribution/src",
6-
"targets": {}
6+
"targets": {},
7+
"implicitDependencies": [
8+
"@compas-oscd/core",
9+
"@compas-oscd/xml",
10+
"@compas-oscd/plugins",
11+
"@compas-oscd/addons",
12+
"@compas-oscd/open-scd",
13+
"@compas-oscd/forms",
14+
"@compas-oscd/wizards"
15+
]
716
}

packages/distribution/tsconfig.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@
1616
"sourceMap": true,
1717
"inlineSources": true,
1818
"resolveJsonModule": true,
19-
"rootDir": "./"
20-
},
19+
"paths": {
20+
"@openscd/addons": ["../addons/src"],
21+
"@openscd/addons/*": ["../addons/*"],
22+
"@openscd/open-scd": ["../openscd/src/open-scd.ts"],
23+
"@openscd/open-scd/*": ["../openscd/*"],
24+
"@openscd/plugins": ["../plugins/src"],
25+
"@openscd/plugins/*": ["../plugins/*"]
26+
}
27+
},
2128
"include": ["**/*.ts"]
2229
}

packages/forms/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@openscd/forms",
2+
"name": "@compas-oscd/forms",
33
"version": "0.0.1",
44
"description": "The forms package OpenSCD",
55
"author": "Open-SCD",

0 commit comments

Comments
 (0)