Skip to content

Commit f14382b

Browse files
committed
feat: added updated ci workflows
1 parent e25eb19 commit f14382b

File tree

8 files changed

+87
-122
lines changed

8 files changed

+87
-122
lines changed

.editorconfig

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
8+
[*]
9+
10+
# Change these settings to your own preference
11+
indent_style = space
12+
indent_size = 2
13+
14+
# We recommend you to keep these unchanged
15+
end_of_line = lf
16+
charset = utf-8
17+
trim_trailing_whitespace = true
18+
insert_final_newline = true
19+
20+
[*.md]
21+
trim_trailing_whitespace = false
22+
23+
[*.json]
24+
indent_size = 2
25+
26+
[*.{html,js,md}]
27+
block_comment_start = /**
28+
block_comment = *
29+
block_comment_end = */
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Deploy
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
- name: Set up Node.js
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version: '22'
18+
19+
- name: Install dependencies
20+
run: npm ci
21+
22+
- name: Build
23+
run: npm run build
24+
25+
- name: Deploy
26+
run: |
27+
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
28+
npx gh-pages -d dist -u "github-actions <support+actions@github.com>"
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-please.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,32 +47,32 @@ jobs:
4747
env:
4848
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4949

50-
gh-pages:
50+
upload-release-bundle:
5151
needs: release-please
5252
if: ${{ needs.release-please.outputs.release_created }}
5353
runs-on: ubuntu-latest
5454
permissions:
5555
contents: write
56-
pages: write
5756
id-token: write
5857

59-
environment:
60-
name: github-pages
61-
url: ${{ steps.deployment.outputs.page_url }}
6258
steps:
6359
- uses: actions/checkout@v4
6460

6561
- name: Setup Node Environment
6662
run: npm ci
6763

64+
- name: Set repository name env var
65+
run: echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
66+
6867
- name: Build plugin bundle
6968
run: npm run bundle
7069

71-
- name: Upload bundle
72-
uses: actions/upload-pages-artifact@v3
73-
with:
74-
path: ./dist
70+
- name: Create zipped bundle
71+
run: |
72+
(cd ./dist && zip -r ../${REPO_NAME}.zip .)
73+
tar -C ./dist -czvf ${REPO_NAME}.tar.gz ./
7574
76-
- name: Deploy to GitHub Pages
77-
id: deployment
78-
uses: actions/deploy-pages@v4
75+
- name: Upload zipped bundle to GitHub release
76+
env:
77+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78+
run: gh release upload ${{ needs.release-please.outputs.tag_name }} ${REPO_NAME}.zip ${REPO_NAME}.tar.gz

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{".":"0.0.1"}
1+
{ ".": "0.0.0" }

CHANGELOG.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
11
# Changelog
2-
3-
## 0.0.1 (2025-07-16)
4-
5-
6-
### Features
7-
8-
* initial commit ([102b24b](https://github.com/OMICRONEnergyOSS/oscd-menu-save/commit/102b24bae09f3659e519fc04c5a203412d4b6f07)), closes [#1](https://github.com/OMICRONEnergyOSS/oscd-menu-save/issues/1)

custom-elements.json

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

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
{
22
"name": "@omicronenergy/oscd-menu-save",
3-
"version": "0.0.1",
3+
"version": "0.0.0",
44
"description": "OpenSCD Menu Plugin for loading IEC 61850 SCL files into OpenSCD.",
55
"type": "module",
6+
"repository": {
7+
"type": "git",
8+
"url": "git+https://github.com/OMICRONEnergyOSS/oscd-menu-save.git"
9+
},
10+
"bugs": {
11+
"url": "https://github.com/OMICRONEnergyOSS/oscd-menu-save/issues"
12+
},
13+
"homepage": "https://openscd.org",
14+
"keywords": [
15+
"OpenSCD",
16+
"iec81650"
17+
],
18+
"author": "OMICRON Electronics GmbH",
19+
"license": "Apache-2.0",
620
"exports": {
721
".": "./dist/oscd-menu-save.js",
822
"./oscd-menu-save.js": "./dist/oscd-menu-save.js"
@@ -25,20 +39,6 @@
2539
"test:watch": "npm run build && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\"",
2640
"prepare": "husky"
2741
},
28-
"repository": {
29-
"type": "git",
30-
"url": "git+https://github.com/OMICRONEnergyOSS/oscd-menu-save.git"
31-
},
32-
"bugs": {
33-
"url": "https://github.com/OMICRONEnergyOSS/oscd-menu-save/issues"
34-
},
35-
"homepage": "https://openscd.org",
36-
"keywords": [
37-
"OpenSCD",
38-
"iec81650"
39-
],
40-
"author": "OMICRON Electronics GmbH",
41-
"license": "Apache-2.0",
4242
"dependencies": {
4343
"@omicronenergy/oscd-api": "^0.1.1",
4444
"@omicronenergy/oscd-menu-open": "^0.0.6",

web-dev-server.bundle.config.js

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

0 commit comments

Comments
 (0)