name: Release Integration

on:
  workflow_dispatch:
    inputs:
      releases:
        required: true
        type: string
        description: 'A json array of releases. Required fields: publish: tagName, publishTag. publish check: pkgName, version'
  workflow_call:
    inputs:
      releases:
        required: true
        type: string
        description: 'A json array of releases. Required fields: publish: tagName, publishTag. publish check: pkgName, version'
    {{#if publish}}
    secrets:
      PUBLISH_TOKEN:
        required: true
    {{/if}}

permissions:
  contents: read
  {{#if publish}}
  id-token: write
  {{/if}}

jobs:
  publish:
    {{> jobReleaseIntegrationYml }}
