Skip to content

[MOBILE-3897] Release 17.1.1 (#221) #36

[MOBILE-3897] Release 17.1.1 (#221)

[MOBILE-3897] Release 17.1.1 (#221) #36

Workflow file for this run

name: Release
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+*"
env:
DEVELOPER_DIR: /Applications/Xcode.app
jobs:
release:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- name: Get Version
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: Verify Version
run: |
VERSION=${{ steps.get_version.outputs.VERSION }}
PLUGIN_VERSION=$(./gradlew -q getVersion)
if [[ $PLUGIN_VERSION = $VERSION ]]; then exit 0 ; else exit 1; fi
- name: Get 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
- name: Setup GCP Auth
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Install dependencies
run: |
brew install doxygen
brew install graphviz
- name: Create google-services.json
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
run: |
echo "$GOOGLE_SERVICES_JSON" > SampleApp/SampleApp.Android/Assets/google-services.json
- name: Build
run: ./gradlew build pkg
- name: Publish Nuget
env:
NUGET_PRODUCTION_API_KEY: ${{ secrets.NUGET_PRODUCTION_API_KEY }}
run: ./gradlew publishToProduction
- name: Upload docs
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}
run: |
gsutil cp docs/build/$VERSION.tar.gz gs://ua-web-ci-prod-docs-transfer/libraries/xamarin/$VERSION.tar.gz
- name: Create 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