Merge pull request #293 from urbanairship/release-11.3.1 #160
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - "[0-9]+.[0-9]+.[0-9]+*" | |
| env: | |
| DEVELOPER_DIR: /Applications/Xcode_26.4.app/Contents/Developer | |
| FLUTTER_VERSION: 3.27.3 | |
| JAVA_VERSION: "17.x" | |
| JAVA_DISTRIBUTION: 'zulu' | |
| jobs: | |
| ci: | |
| runs-on: macos-26-xlarge | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-java@v2 | |
| with: | |
| distribution: ${{ env.JAVA_DISTRIBUTION }} | |
| java-version: ${{ env.JAVA_VERSION }} | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{env.FLUTTER_VERSION}} | |
| - name: Run CI | |
| run: bash ./scripts/run_ci_tasks.sh | |
| release-plugin-pub-dev: | |
| needs: [ ci ] | |
| permissions: | |
| id-token: write | |
| uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 | |
| release-plugin-github: | |
| runs-on: ubuntu-latest | |
| needs: [ ci , release-plugin-pub-dev ] | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Get the version | |
| id: get_version | |
| run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
| - name: Get the release notes | |
| id: get_release_notes | |
| env: | |
| VERSION: ${{ steps.get_version.outputs.VERSION }} | |
| run: | | |
| delimiter="$(openssl rand -hex 8)" | |
| { | |
| echo "NOTES<<${delimiter}" | |
| awk "/## Version $VERSION/{flag=1;next}/## Version/{flag=0}flag" CHANGELOG.md | |
| echo ${delimiter} | |
| } >> $GITHUB_OUTPUT | |
| - uses: actions/setup-java@v2 | |
| with: | |
| distribution: ${{ env.JAVA_DISTRIBUTION }} | |
| java-version: ${{ env.JAVA_VERSION }} | |
| - name: Flutter action | |
| uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 | |
| with: | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| - run: flutter pub get | |
| - name: Github Release | |
| uses: actions/create-release@v1.0.1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ steps.get_version.outputs.VERSION }} | |
| release_name: ${{ steps.get_version.outputs.VERSION }} | |
| body: ${{ steps.get_release_notes.outputs.NOTES }} | |
| draft: false | |
| prerelease: false | |
| - name: Slack Notification | |
| uses: homoluctus/slatify@master | |
| if: failure() | |
| with: | |
| type: ${{ job.status }} | |
| job_name: "Failed to release Flutter :(" | |
| url: ${{ secrets.MOBILE_SLACK_WEBHOOK }} | |
| release-docs: | |
| runs-on: macos-26-xlarge | |
| needs: [ ci, release-plugin-github, release-plugin-pub-dev ] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Get the version | |
| id: get_version | |
| run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
| - uses: actions/setup-java@v2 | |
| with: | |
| distribution: ${{ env.JAVA_DISTRIBUTION }} | |
| java-version: ${{ env.JAVA_VERSION }} | |
| - name: Flutter action | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| - name: Setup GCP Auth | |
| uses: google-github-actions/auth@v2 | |
| with: | |
| credentials_json: ${{ secrets.GCP_SA_KEY }} | |
| - name: Set up Cloud SDK | |
| uses: google-github-actions/setup-gcloud@v2 | |
| - name: Build & Package docs | |
| run: | | |
| VERSION=${{ steps.get_version.outputs.VERSION }} | |
| flutter pub get | |
| bash ./scripts/docs.sh -gp $VERSION doc/api | |
| - name: Upload docs | |
| env: | |
| VERSION: ${{ steps.get_version.outputs.VERSION }} | |
| run: | | |
| gsutil cp doc/$VERSION.tar.gz gs://ua-web-ci-prod-docs-transfer/libraries/flutter/$VERSION.tar.gz | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: doc/api | |
| - name: Slack Notification | |
| uses: homoluctus/slatify@master | |
| with: | |
| type: ${{ job.status }} | |
| job_name: ":raised_hands: Airship Flutter Plugin Released! :raised_hands:" | |
| url: ${{ secrets.MOBILE_SLACK_WEBHOOK }} | |
| deploy-docs: | |
| needs: release-docs | |
| runs-on: ubuntu-latest | |
| continue-on-error: true # Remove when migration to GH Pages is complete | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |