[MOBILE-4122] Release 9.2.1 (#135) #23
Workflow file for this run
This file contains 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]+*" | |
jobs: | |
plugin: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get Version | |
id: get_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
- name: Verify Version | |
run: | | |
VERSION=${{ steps.get_version.outputs.VERSION }} | |
PLUGIN_VERSION=$(./gradlew -q getPluginVersion) | |
if [[ $PLUGIN_VERSION = $VERSION ]]; then exit 0 ; else exit 1; fi | |
- name: Get Release Notes | |
id: get_release_notes | |
run: | | |
VERSION=${{ steps.get_version.outputs.VERSION }} | |
NOTES="$(awk "/## Version $VERSION/{flag=1;next}/## Version/{flag=0}flag" CHANGELOG.md)" | |
NOTES="${NOTES//'%'/'%25'}" | |
NOTES="${NOTES//$'\n'/'%0A'}" | |
NOTES="${NOTES//$'\r'/'%0D'}" | |
echo ::set-output name=NOTES::"$NOTES" | |
- name: Build | |
env: | |
UNITY_USERNAME: ${{ secrets.ULRICH_UNITY_EMAIL }} | |
UNITY_PASSWORD: ${{ secrets.ULRICH_UNITY_PASSWORD }} | |
UNITY_SERIAL: ${{ secrets.ULRICH_UNITY_SERIAL }} | |
run: ./scripts/docker_run.sh | |
- name: Create Github Release | |
uses: actions/[email protected] | |
id: create_release | |
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: Upload Asset to Github release | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./build/urbanairship-${{ steps.get_version.outputs.VERSION }}.unitypackage | |
asset_name: urbanairship-${{ steps.get_version.outputs.VERSION }}.unitypackage | |
asset_content_type: application/octet-stream | |
# - name: Bintray Release | |
# env: | |
# BINTRAY_AUTH: ${{ secrets.BINTRAY_AUTH }} | |
# run: bash ./scripts/deploy_bintray.sh ${{ steps.get_version.outputs.VERSION }} | |
docs: | |
runs-on: ubuntu-latest | |
needs: plugin | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get Version | |
id: get_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
- name: Setup GCP | |
uses: google-github-actions/setup-gcloud@daadedc81d5f9d3c06d2c92f49202a3cc2b919ba # v0.2.1 | |
with: | |
version: '351.0.0' | |
service_account_email: ${{ secrets.GCP_SA_EMAIL }} | |
service_account_key: ${{ secrets.GCP_SA_KEY }} | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Build Docs | |
run: | | |
sudo apt-get install doxygen | |
./gradlew docs:build | |
- name: Upload Docs | |
run: | | |
VERSION=${{ steps.get_version.outputs.VERSION }} | |
gsutil cp docs/build/$VERSION.tar.gz gs://ua-web-ci-prod-docs-transfer/libraries/unity/$VERSION.tar.gz |