Skip to content

Commit ccbd59e

Browse files
authored
Merge pull request #6 from FlowFuse/ci-add-package-publish-workflow
ci: Add `Build and publish package` workflow
2 parents d08eaf7 + 09471f0 commit ccbd59e

File tree

5 files changed

+168
-5
lines changed

5 files changed

+168
-5
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
package-lock.json
22
node_modules
33
dist/*
4+
resources/*

.github/workflows/publish.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build and publish package
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
push:
7+
branches:
8+
- main
9+
10+
11+
jobs:
12+
build:
13+
uses: 'flowfuse/github-actions-workflows/.github/workflows/build_node_package.yml@v0.37.0'
14+
with:
15+
node: '[
16+
{"version": "18", "tests": false, "lint": true},
17+
]'
18+
19+
publish:
20+
if: |
21+
( github.event_name == 'push' && github.ref == 'refs/heads/main' ) ||
22+
( github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' )
23+
needs: build
24+
uses: 'flowfuse/github-actions-workflows/.github/workflows/publish_node_package.yml@v0.37.0'
25+
with:
26+
package_name: node-red-dashboard-2-ui-flowviewer
27+
publish_package: true
28+
secrets:
29+
npm_registry_token: ${{ secrets.NPM_PUBLISH_TOKEN }}

package-lock.json

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

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
"lint:js": "eslint --ext .js,.vue,.cjs,.mjs .",
3636
"lint:js:fix": "yarn lint:js --fix",
3737
"lint:package": "sort-package-json --check 'package.json'",
38-
"lint:package:fix": "sort-package-json 'package.json'"
38+
"lint:package:fix": "sort-package-json 'package.json'",
39+
"test": "echo \"Error: no tests specified\" && exit 0"
3940
},
4041
"dependencies": {
4142
"@flowfuse/flow-renderer": "^0.4.1",
@@ -49,6 +50,7 @@
4950
"eslint-plugin-import": "^2.29.0",
5051
"eslint-plugin-n": "^16.3.1",
5152
"eslint-plugin-vue": "^9.18.1",
53+
"sort-package-json": "^2.11.0",
5254
"vite": "^5.0.13",
5355
"vite-plugin-css-injected-by-js": "^3.3.0"
5456
},

ui/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
*/
66
import { createApp } from 'vue'
77

8-
import UIIframe from './components/UIIframe.vue'
8+
import UIFlowViewer from './components/UIFlowViewer.vue'
99

10-
createApp(UIIframe).mount('#app')
10+
createApp(UIFlowViewer).mount('#app')

0 commit comments

Comments
 (0)