Skip to content

Commit

Permalink
Add build and publish nightly package workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ppawlowski committed Jul 3, 2024
1 parent 6bf8794 commit 8374471
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build and push packages

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
uses: 'flowfuse/github-actions-workflows/.github/workflows/build_node_package.yml@v0.19.0'
with:
node: '[
{"version": "14", "tests": true, "lint": false},
{"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.19.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: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.GH_BOT_APP_ID }}
private_key: ${{ secrets.GH_BOT_APP_KEY }}
- name: Trigger nr-launcher package build
uses: benc-uk/workflow-dispatch@v1
with:
workflow: publish.yml
repo: flowfuse/nr-launcher
ref: main
token: ${{ steps.generate_token.outputs.token }}

0 comments on commit 8374471

Please sign in to comment.