-
Notifications
You must be signed in to change notification settings - Fork 8
102 lines (96 loc) · 3.34 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Build and push packages
on:
workflow_dispatch:
inputs:
nr_project_nodes_release_name:
description: 'nr-project-nodes package version'
required: false
default: 'nightly'
nr_project_nodes_ref:
description: 'nr-project-nodes package ref'
required: false
nr_file_nodes_release_name:
description: 'nr-file-nodes package version'
required: false
default: 'nightly'
nr_file_nodes_ref:
description: 'nr-file-nodes package ref'
required: false
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build:
uses: 'flowfuse/github-actions-workflows/.github/workflows/build_node_package.yml@v0.33.0'
with:
node: '[
{"version": "18", "tests": true, "lint": true},
]'
nrLauncherPackage:
needs: build
if: |
( github.event_name == 'push' && github.ref == 'refs/heads/main' ) ||
( github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' )
uses: 'flowfuse/github-actions-workflows/.github/workflows/publish_node_package.yml@fix-separate-checkout-workdir'
with:
package_name: flowfuse-nr-launcher
publish_package: true
package_dependencies: |
@flowfuse/nr-project-nodes=nightly
@flowfuse/nr-file-nodes=nightly
@flowfuse/nr-assistant=nightly
secrets:
npm_registry_token: ${{ secrets.NPM_PUBLISH_TOKEN }}
nrThemePackage:
needs: build
# if: |
# ( github.event_name == 'push' && github.ref == 'refs/heads/main' ) ||
# ( github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' )
uses: 'flowfuse/github-actions-workflows/.github/workflows/publish_node_package.yml@fix-separate-checkout-workdir'
with:
package_name: flowfuse-nr-theme
publish_package: true
working_directory: ./lib/theme
disable_ignore_scripts_on_publish: true
secrets:
npm_registry_token: ${{ secrets.NPM_PUBLISH_TOKEN }}
dispatch-nr-container:
name: Dispatch node-red container build
needs: [nrLauncherPackage, nrThemePackage]
runs-on: ubuntu-latest
steps:
- name: Generate a token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.GH_BOT_APP_ID }}
private_key: ${{ secrets.GH_BOT_APP_KEY }}
- name: Trigger node-red container build
uses: benc-uk/workflow-dispatch@v1
with:
workflow: nodered-container.yml
repo: flowfuse/helm
ref: main
token: ${{ steps.generate_token.outputs.token }}
dispatch:
name: Dispatch localfs package build pipeline
runs-on: ubuntu-latest
needs: [nrLauncherPackage, nrThemePackage]
steps:
- name: Generate a token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.GH_BOT_APP_ID }}
private_key: ${{ secrets.GH_BOT_APP_KEY }}
- name: Trigger localfs package build
uses: benc-uk/workflow-dispatch@v1
with:
workflow: publish.yml
repo: flowfuse/driver-localfs
ref: main
token: ${{ steps.generate_token.outputs.token }}
inputs: '{"nr_launcher_ref": "${{ github.ref }}", "nr_launcher_release_name": "${{ needs.nrLauncherPackage.outputs.release_name }}"}'