-
Notifications
You must be signed in to change notification settings - Fork 5
58 lines (52 loc) · 1.74 KB
/
Copy pathpublish.yaml
File metadata and controls
58 lines (52 loc) · 1.74 KB
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
name: Build and push packages
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
uses: 'flowfuse/github-actions-workflows/.github/workflows/build_node_package.yml@v0.52.0'
with:
node: '[
{"version": "16", "tests": true, "lint": false},
{"version": "18", "tests": true, "lint": true},
{"version": "20", "tests": true, "lint": true},
]'
publish:
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@v0.52.0'
with:
package_name: nr-assistant
publish_package: true
secrets:
npm_registry_token: ${{ secrets.NPM_PUBLISH_TOKEN }}
dispatch_nr_launcher:
name: Dispatch nr-launcher package build
needs: publish
runs-on: ubuntu-latest
steps:
- name: Generate a token
id: generate_token
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
with:
app-id: ${{ secrets.GH_BOT_APP_ID }}
private-key: ${{ secrets.GH_BOT_APP_KEY }}
owner: ${{ github.repository_owner }}
repositories: nr-launcher
- name: Trigger nr-launcher package build
uses: benc-uk/workflow-dispatch@7a027648b88c2413826b6ddd6c76114894dc5ec4 # v1.3.1
with:
workflow: publish.yml
repo: flowfuse/nr-launcher
ref: main
token: ${{ steps.generate_token.outputs.token }}