Skip to content

Commit

Permalink
Alternative workflow input
Browse files Browse the repository at this point in the history
  • Loading branch information
cnixbtc committed Nov 7, 2023
1 parent 0a47d53 commit 9cdea22
Showing 1 changed file with 25 additions and 40 deletions.
65 changes: 25 additions & 40 deletions .github/workflows/publish-all-platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,19 @@ on:
description: 'commit/tag/branch reference'
required: true
type: string
csharp-package-version:
description: 'version for the C# nuget package (MAJOR.MINOR.BUILD)'
required: false
package-version:
description: 'version for the published package(s) (MAJOR.MINOR.BUILD)'
required: true
type: string
packages-to-publish:
description: 'array of packages to publish (remove what you do not want)'
required: true
type: string
default: '["csharp", "golang", "maven", "kotlin-mpp", "flutter", "react-native", "python"]'
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
python-package-version:
description: 'version for the python package (MAJOR.MINOR.BUILD)'
required: false
type: string
use-dummy-binaries:
description: 'boolean indicating whether to use dummies for the sdk binaries. Default = false.'
required: false
Expand Down Expand Up @@ -86,6 +67,10 @@ on:
description: 'version for the react native package (MAJOR.MINOR.BUILD)'
required: false
type: string
python-package-version:
description: 'version for the python package (MAJOR.MINOR.BUILD)'
required: false
type: string
use-dummy-binaries:
description: 'boolean indicating whether to use dummies for the sdk binaries. Default = false.'
required: false
Expand All @@ -104,14 +89,14 @@ jobs:
# certain inputs.
repository: ${{ inputs.repository || github.repository }}
ref: ${{ inputs.ref || github.sha }}
csharp-package-version: ${{ inputs.csharp-package-version }}
csharp-package-version: ${{ (contains(fromJSON(inputs.packages-to-publish), 'csharp') && inputs.package-version) || '' }}
csharp-ref: ${{ inputs.csharp-ref || inputs.ref || github.sha }}
golang-package-version: ${{ inputs.golang-package-version }}
maven-package-version: ${{ inputs.maven-package-version }}
kotlin-mpp-package-version: ${{ inputs.kotlin-mpp-package-version }}
flutter-package-version: ${{ inputs.flutter-package-version }}
react-native-package-version: ${{ inputs.react-native-package-version }}
python-package-version: ${{ inputs.python-package-version }}
golang-package-version: ${{ (contains(fromJSON(inputs.packages-to-publish), 'golang') && inputs.package-version) || '' }}
maven-package-version: ${{ (contains(fromJSON(inputs.packages-to-publish), 'maven') && inputs.package-version) || ''}}
kotlin-mpp-package-version: ${{ (contains(fromJSON(inputs.packages-to-publish), 'kotlin-mpp') && inputs.package-version) || '' }}
flutter-package-version: ${{ (contains(fromJSON(inputs.packages-to-publish), 'flutter') && inputs.package-version) || '' }}
react-native-package-version: ${{ (contains(fromJSON(inputs.packages-to-publish), 'react-native') && inputs.package-version) || '' }}
python-package-version: ${{ (contains(fromJSON(inputs.packages-to-publish), 'python') && inputs.package-version) || '' }}
use-dummy-binaries: ${{ inputs.use-dummy-binaries }}
publish: ${{ inputs.publish }}
steps:
Expand Down Expand Up @@ -210,7 +195,7 @@ jobs:
swift: ${{ needs.setup.outputs.swift == 'true'}}

publish-csharp:
needs:
needs:
- setup
- build-bindings-windows
- build-bindings-darwin
Expand All @@ -228,7 +213,7 @@ jobs:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}

publish-golang:
needs:
needs:
- setup
- build-bindings-android
- build-bindings-windows
Expand All @@ -245,7 +230,7 @@ jobs:
REPO_SSH_KEY: ${{ secrets.REPO_SSH_KEY }}

publish-maven:
needs:
needs:
- setup
- build-bindings-android
- build-language-bindings
Expand All @@ -261,7 +246,7 @@ jobs:
BREEZ_MVN_PASSWORD: ${{ secrets.BREEZ_MVN_PASSWORD }}

publish-kotlin-mpp:
needs:
needs:
- setup
- build-bindings-android
- build-bindings-ios
Expand All @@ -278,9 +263,9 @@ jobs:
BREEZ_MVN_PASSWORD: ${{ secrets.BREEZ_MVN_PASSWORD }}

publish-flutter:
needs:
needs:
- setup
- build-bindings-android
- build-bindings-android
if: ${{ needs.setup.outputs.flutter == 'true' }}
uses: ./.github/workflows/publish-flutter.yml
with:
Expand Down

0 comments on commit 9cdea22

Please sign in to comment.