From d686298ceb7fd1e2868a66eb59d654c60d7a22c5 Mon Sep 17 00:00:00 2001 From: Max Cobb <5754073+maxxfrazer@users.noreply.github.com> Date: Wed, 25 Oct 2023 10:18:21 +0100 Subject: [PATCH] [ci][release] Separate dartdoc job (#1401) Seems that something else in the release_if_merged job is setting up a specific dart environment that isn't compatible. Moved the dartdoc steps to a separate job, which will complete as normal. The dartdoc job depends on the main `release_if_merged` to complete without errors. --- .github/workflows/build.yml | 1 + .github/workflows/release.yml | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9106b99b5..5576e547d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,6 +46,7 @@ jobs: channel: 'stable' - name: Build DartDoc 📖 run: | + dart pub get # Generate DartDoc dart doc # Create a zip file of the DartDoc output diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 30a639572..175c6b828 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,6 +10,8 @@ jobs: if: ${{ github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' && contains(github.event.pull_request.labels.*.name, 'ci:prepare_release') }} + outputs: + release_version: ${{steps.release.outputs.version}} runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -55,20 +57,30 @@ jobs: refreshToken: ${{ secrets.OAUTH_REFRESH_TOKEN }} force: true # We have checked the `dart pub publish --dry-run` `in build.yaml`, it's ok to force publish here. skipTests: true + attach_docs: + name: Attach dartdoc + runs-on: ubuntu-latest + needs: release_if_merged + steps: + - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: channel: 'stable' - name: Build DartDoc 📖 run: | - dart --version + dart pub get # Generate DartDoc dart doc - # Create a zip file of the DartDoc output zip -r agora_rtc_engine_docs.zip doc + - name: Upload DartDoc Artifact ⬆️ + uses: actions/upload-artifact@v3 + with: + name: agora_rtc_engine_docs.zip + path: agora_rtc_engine_docs.zip - name: Upload DartDoc Archive to GitHub release ⬆️ uses: svenstaro/upload-release-action@2.6.0 with: file: agora_rtc_engine_docs.zip asset_name: agora_rtc_engine_docs.zip - tag: ${{ steps.release.outputs.version }} + tag: ${{ needs.release_if_merged.outputs.release_version }}