Skip to content

Commit

Permalink
Merge pull request #6 from FlowFuse/ci-add-package-publish-workflow
Browse files Browse the repository at this point in the history
ci: Add `Build and publish package` workflow
  • Loading branch information
Steve-Mcl authored Nov 21, 2024
2 parents d08eaf7 + 09471f0 commit ccbd59e
Show file tree
Hide file tree
Showing 5 changed files with 168 additions and 5 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package-lock.json
node_modules
dist/*
resources/*
29 changes: 29 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build and publish package
on:
pull_request:
branches:
- main
push:
branches:
- main


jobs:
build:
uses: 'flowfuse/github-actions-workflows/.github/workflows/build_node_package.yml@v0.37.0'
with:
node: '[
{"version": "18", "tests": false, "lint": true},
]'

publish:
if: |
( github.event_name == 'push' && github.ref == 'refs/heads/main' ) ||
( github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' )
needs: build
uses: 'flowfuse/github-actions-workflows/.github/workflows/publish_node_package.yml@v0.37.0'
with:
package_name: node-red-dashboard-2-ui-flowviewer
publish_package: true
secrets:
npm_registry_token: ${{ secrets.NPM_PUBLISH_TOKEN }}
135 changes: 133 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"lint:js": "eslint --ext .js,.vue,.cjs,.mjs .",
"lint:js:fix": "yarn lint:js --fix",
"lint:package": "sort-package-json --check 'package.json'",
"lint:package:fix": "sort-package-json 'package.json'"
"lint:package:fix": "sort-package-json 'package.json'",
"test": "echo \"Error: no tests specified\" && exit 0"
},
"dependencies": {
"@flowfuse/flow-renderer": "^0.4.1",
Expand All @@ -49,6 +50,7 @@
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-n": "^16.3.1",
"eslint-plugin-vue": "^9.18.1",
"sort-package-json": "^2.11.0",
"vite": "^5.0.13",
"vite-plugin-css-injected-by-js": "^3.3.0"
},
Expand Down
4 changes: 2 additions & 2 deletions ui/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
*/
import { createApp } from 'vue'

import UIIframe from './components/UIIframe.vue'
import UIFlowViewer from './components/UIFlowViewer.vue'

createApp(UIIframe).mount('#app')
createApp(UIFlowViewer).mount('#app')

0 comments on commit ccbd59e

Please sign in to comment.