diff --git a/.github/workflows/publish-all-platforms.yml b/.github/workflows/publish-all-platforms.yml index f9f4c1509..9c0a91b6d 100644 --- a/.github/workflows/publish-all-platforms.yml +++ b/.github/workflows/publish-all-platforms.yml @@ -41,8 +41,23 @@ on: default: false jobs: + pre-setup: + name: Pre-setup + runs-on: ubuntu-latest + outputs: + ref: ${{ inputs.ref || github.sha }} + csharp-package-version: ${{ inputs.csharp-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 }} + publish: ${{ inputs.publish }} + setup: name: Setup + needs: pre-setup runs-on: ubuntu-latest outputs: # Careful, a boolean input is not a boolean output. A boolean input is @@ -50,30 +65,30 @@ jobs: # 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: ${{ !!inputs.flutter-package-version }} - kotlin: ${{ !!inputs.kotlin-mpp-package-version || !!inputs.maven-package-version }} + bindings-windows: ${{ !!needs.pre-setup.outputs.csharp-package-version || !!needs.pre-setup.outputs.golang-package-version }} + bindings-darwin: ${{ !!needs.pre-setup.outputs.csharp-package-version || !!needs.pre-setup.outputs.golang-package-version }} + bindings-linux: ${{ !!needs.pre-setup.outputs.csharp-package-version || !!needs.pre-setup.outputs.golang-package-version }} + bindings-android: ${{ !!needs.pre-setup.outputs.kotlin-mpp-package-version || !!needs.pre-setup.outputs.maven-package-version || !!needs.pre-setup.outputs.golang-package-version }} + bindings-ios: ${{ !!needs.pre-setup.outputs.kotlin-mpp-package-version || !!needs.pre-setup.outputs.maven-package-version }} + core-android: ${{ !!needs.pre-setup.outputs.flutter-package-version }} + kotlin: ${{ !!needs.pre-setup.outputs.kotlin-mpp-package-version || !!needs.pre-setup.outputs.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: ${{ !!inputs.flutter-package-version }} - 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: ${{ inputs.flutter-package-version || '0.0.2' }} - react-native-package-version: ${{ inputs.react-native-package-version || '0.0.2' }} - publish: ${{ inputs.publish }} + csharp: ${{ !!needs.pre-setup.outputs.csharp-package-version }} + golang: ${{ !!needs.pre-setup.outputs.golang-package-version }} + maven: ${{ !!needs.pre-setup.outputs.maven-package-version }} + kotlin-mpp: ${{ !!needs.pre-setup.outputs.kotlin-mpp-package-version }} + flutter: ${{ !!needs.pre-setup.outputs.flutter-package-version }} + react-native: ${{ !!needs.pre-setup.outputs.react-native-package-version }} + ref: ${{ needs.pre-setup.outputs.ref }} + csharp-package-version: ${{ needs.pre-setup.outputs.csharp-package-version || '0.0.2' }} + csharp-ref: ${{ needs.pre-setup.outputs.csharp-ref }} + golang-package-version: ${{ needs.pre-setup.outputs.golang-package-version || '0.0.2' }} + maven-package-version: ${{ needs.pre-setup.outputs.maven-package-version || '0.0.2' }} + kotlin-mpp-package-version: ${{ needs.pre-setup.outputs.kotlin-mpp-package-version || '0.0.2' }} + flutter-package-version: ${{ needs.pre-setup.outputs.flutter-package-version || '0.0.2' }} + react-native-package-version: ${{ needs.pre-setup.outputs.react-native-package-version || '0.0.2' }} + publish: ${{ needs.pre-setup.outputs.publish }} steps: - run: echo "set output variables"