Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,22 @@ jobs:
maven:
runs-on: ubuntu-latest
timeout-minutes: 30
outputs:
tag: ${{ steps.version.outputs.tag }}
steps:
- name: Checkout project
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # 3.6.0

- name: Determine version
id: version
run: |
if [ "${{ github.event_name }}" == "release" ]; then
echo "tag=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
else
VERSION=$(sed -nE "s/version = '([0-9.]+)'/\1/p" build.gradle)
echo "tag=$VERSION" >> $GITHUB_OUTPUT
fi

- name: Set up our JDK environment
uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 #3.14.1
with:
Expand Down Expand Up @@ -41,5 +53,6 @@ jobs:
needs: maven
uses: ./.github/workflows/repo-dispatch-on-release.yml
with:
tag: ${{ github.event.release.tag_name }}
tag: ${{ needs.maven.outputs.tag }}
wait_minutes: 20
secrets: inherit
16 changes: 13 additions & 3 deletions .github/workflows/repo-dispatch-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,32 @@ on:
description: 'Android SDK version (e.g., 6.3.0)'
required: true
type: string
wait_minutes:
description: 'Minutes to wait before dispatching (0 to skip)'
required: false
type: number
default: 0
workflow_dispatch:
inputs:
tag:
description: 'Android SDK version (e.g., 6.3.0)'
required: true
type: string
wait_minutes:
description: 'Minutes to wait before dispatching (0 to skip)'
required: false
type: number
default: 0

jobs:
repo-dispatch-on-release:
runs-on: ubuntu-latest
steps:
- name: Log version
run: 'echo "Dispatching for version: ${{ inputs.tag }}"'
- name: Wait 20 minutes for Maven Central propagation
if: github.event_name == 'workflow_call'
run: sleep 1200
- name: Wait for Maven Central propagation
if: inputs.wait_minutes > 0
run: sleep ${{ fromJSON(inputs.wait_minutes) * 60 }}
- name: Send repository dispatch to Flutter SDK
env:
GH_TOKEN: ${{ secrets.SERVICE_ACCOUNT_PAT }}
Expand Down