Skip to content

temp: test flutter release #55

temp: test flutter release

temp: test flutter release #55

name: Publish all packages
on:
workflow_dispatch:
inputs:
ref:
description: 'commit/tag/branch reference'
required: true
type: string
csharp-package-version:
description: 'version for the C# nuget package (MAJOR.MINOR.BUILD)'
required: false
type: string
csharp-ref:
description: 'optional commit/tag/branch reference for the C# project. Defaults to ref.'
required: false
type: string
golang-package-version:
description: 'version for the golang package (MAJOR.MINOR.BUILD) (no v prefix)'
required: false
type: string
maven-package-version:
description: 'version for the android package (MAJOR.MINOR.BUILD)'
required: false
type: string
kotlin-mpp-package-version:
description: 'version for the kotlin multiplatform package (MAJOR.MINOR.BUILD)'
required: false
type: string
flutter-package-version:
description: 'version for the flutter package (MAJOR.MINOR.BUILD) (no v prefix)'
required: false
type: string
react-native-package-version:
description: 'version for the react native package (MAJOR.MINOR.BUILD)'
required: false
type: string
publish:
description: 'boolean indicating whether packages should be published. true to publish. false to build only. Default = false.'
required: false
type: boolean
default: false
push:
branches:
- fix-flutter-release
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
outputs:
# Careful, a boolean input is not a boolean output. A boolean input is
# actually a boolean, but these outputs are strings. All the boolean
# checks in this file have the format `boolean == 'true'`. So feel free
# to set these variables here to `true` or `false`
# (e.g. bindings-windows: true) if you want to test something.
bindings-windows: ${{ !!inputs.csharp-package-version || !!inputs.golang-package-version }}
bindings-darwin: ${{ !!inputs.csharp-package-version || !!inputs.golang-package-version }}
bindings-linux: ${{ !!inputs.csharp-package-version || !!inputs.golang-package-version }}
bindings-android: ${{ !!inputs.kotlin-mpp-package-version || !!inputs.maven-package-version || !!inputs.golang-package-version }}
bindings-ios: ${{ !!inputs.kotlin-mpp-package-version || !!inputs.maven-package-version }}
core-android: true
kotlin: ${{ !!inputs.kotlin-mpp-package-version || !!inputs.maven-package-version }}
swift: false
python: false
csharp: ${{ !!inputs.csharp-package-version }}
golang: ${{ !!inputs.golang-package-version }}
maven: ${{ !!inputs.maven-package-version }}
kotlin-mpp: ${{ !!inputs.kotlin-mpp-package-version }}
flutter: true
react-native: ${{ !!inputs.react-native-package-version }}
ref: ${{ inputs.ref || github.sha }}
csharp-package-version: ${{ inputs.csharp-package-version || '0.0.2' }}
csharp-ref: ${{ inputs.csharp-ref || inputs.ref || github.sha }}
golang-package-version: ${{ inputs.golang-package-version || '0.0.2' }}
maven-package-version: ${{ inputs.maven-package-version || '0.0.2' }}
kotlin-mpp-package-version: ${{ inputs.kotlin-mpp-package-version || '0.0.2' }}
flutter-package-version: '0.2.4'
react-native-package-version: ${{ inputs.react-native-package-version || '0.0.2' }}
publish: false
steps:
- run: echo "set output variables"
build-bindings-windows:
needs: setup
if: ${{ needs.setup.outputs.bindings-windows == 'true' }}
uses: ./.github/workflows/build-bindings-windows.yml
with:
ref: ${{ needs.setup.outputs.ref }}
build-bindings-darwin:
needs: setup
if: ${{ needs.setup.outputs.bindings-darwin == 'true' }}
uses: ./.github/workflows/build-bindings-darwin.yml
with:
ref: ${{ needs.setup.outputs.ref }}
build-bindings-linux:
needs: setup
if: ${{ needs.setup.outputs.bindings-linux == 'true' }}
uses: ./.github/workflows/build-bindings-linux.yml
with:
ref: ${{ needs.setup.outputs.ref }}
build-bindings-android:
needs: setup
if: ${{ needs.setup.outputs.bindings-android == 'true' }}
uses: ./.github/workflows/build-bindings-android.yml
with:
ref: ${{ needs.setup.outputs.ref }}
build-bindings-ios:
needs: setup
if: ${{ needs.setup.outputs.bindings-ios == 'true' }}
uses: ./.github/workflows/build-bindings-ios.yml
with:
ref: ${{ needs.setup.outputs.ref }}
build-core-android:
needs: setup
if: ${{ needs.setup.outputs.core-android == 'true' }}
uses: ./.github/workflows/build-core-android.yml
with:
ref: ${{ needs.setup.outputs.ref }}
build-language-bindings:
needs: setup
uses: ./.github/workflows/build-language-bindings.yml
with:
ref: ${{ needs.setup.outputs.ref }}
kotlin: ${{ needs.setup.outputs.kotlin == 'true'}}
csharp: ${{ needs.setup.outputs.csharp == 'true'}}
golang: ${{ needs.setup.outputs.golang == 'true'}}
python: ${{ needs.setup.outputs.python == 'true'}}
swift: ${{ needs.setup.outputs.swift == 'true'}}
publish-csharp:
needs:
- setup
- build-bindings-windows
- build-bindings-darwin
- build-bindings-linux
- build-language-bindings
if: ${{ needs.setup.outputs.csharp == 'true' }}
uses: ./.github/workflows/publish-csharp.yml
with:
ref: ${{ needs.setup.outputs.csharp-ref }}
package-version: ${{ needs.setup.outputs.csharp-package-version }}
publish: ${{ needs.setup.outputs.publish == 'true' }}
secrets:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
publish-golang:
needs:
- setup
- build-bindings-android
- build-bindings-windows
- build-bindings-darwin
- build-bindings-linux
- build-language-bindings
if: ${{ needs.setup.outputs.golang == 'true' }}
uses: ./.github/workflows/publish-golang.yml
with:
ref: ${{ needs.setup.outputs.ref }}
package-version: ${{ needs.setup.outputs.golang-package-version }}
publish: ${{ needs.setup.outputs.publish == 'true' }}
secrets:
REPO_SSH_KEY: ${{ secrets.REPO_SSH_KEY }}
publish-maven:
needs:
- setup
- build-bindings-android
- build-language-bindings
if: ${{ needs.setup.outputs.maven == 'true' }}
uses: ./.github/workflows/publish-android.yml
with:
ref: ${{ needs.setup.outputs.ref }}
package-version: ${{ needs.setup.outputs.maven-package-version }}
publish: ${{ needs.setup.outputs.publish == 'true' }}
secrets:
BREEZ_MVN_USERNAME: ${{ secrets.BREEZ_MVN_USERNAME }}
BREEZ_MVN_PASSWORD: ${{ secrets.BREEZ_MVN_PASSWORD }}
publish-kotlin-mpp:
needs:
- setup
- build-bindings-android
- build-bindings-ios
- build-language-bindings
if: ${{ needs.setup.outputs.kotlin-mpp == 'true' }}
uses: ./.github/workflows/publish-kotlin-mpp.yml
with:
ref: ${{ needs.setup.outputs.ref }}
package-version: ${{ needs.setup.outputs.kotlin-mpp-package-version }}
publish: ${{ needs.setup.outputs.publish == 'true' }}
secrets:
BREEZ_MVN_USERNAME: ${{ secrets.BREEZ_MVN_USERNAME }}
BREEZ_MVN_PASSWORD: ${{ secrets.BREEZ_MVN_PASSWORD }}
publish-flutter:
needs:
- setup
- build-core-android
if: ${{ needs.setup.outputs.flutter == 'true' }}
uses: ./.github/workflows/publish-flutter.yml
with:
ref: ${{ needs.setup.outputs.ref }}
package-version: ${{ needs.setup.outputs.flutter-package-version }}
publish: ${{ needs.setup.outputs.publish == 'true' }}
secrets:
REPO_SSH_KEY: ${{ secrets.REPO_SSH_KEY }}
# react native version x.y.z will at runtime require
# ios and android packages x.y.z being published already.
publish-react-native:
needs:
- setup
if: ${{ needs.setup.outputs.react-native == 'true' }}
uses: ./.github/workflows/publish-react-native.yml
with:
ref: ${{ needs.setup.outputs.ref }}
package-version: ${{ needs.setup.outputs.react-native-package-version }}
publish: ${{ needs.setup.outputs.publish == 'true' }}
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}