Skip to content

Commit

Permalink
[ci][release] Separate dartdoc job (#1401)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
maxxfrazer authored Oct 25, 2023
1 parent ecfee97 commit d686298
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/[email protected]
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 }}

0 comments on commit d686298

Please sign in to comment.