Skip to content

Build and push package #353

Build and push package

Build and push package #353

Workflow file for this run

name: Build and push package
on:
workflow_dispatch:
inputs:
nr_launcher_release_name:
description: 'flowfuse-nr-launcher package version'
required: false
default: 'nightly'
nr_launcher_ref:
description: 'flowfuse-nr-launcher 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.14.0'
with:
node: '[
{"version": "18", "tests": false, "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.1.0'
with:
package_name: driver-localfs
publish_package: true
package_dependencies: |
@flowfuse/nr-launcher
secrets:
npm_registry_token: ${{ secrets.NPM_PUBLISH_TOKEN }}
dispatch:
name: Dispatch flowfuse package build
runs-on: ubuntu-latest
needs: publish
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 flowfuse package build
run: |
gh workflow run --repo flowfuse/flowfuse --ref main publish.yml -f localfs_ref="${{ github.ref }}" -f localfs_release_name="${{ needs.publish.outputs.release_name }}"
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}