Skip to content

[STAD-578] Remove flavors and fix emulator in CI #94

[STAD-578] Remove flavors and fix emulator in CI

[STAD-578] Remove flavors and fix emulator in CI #94

Workflow file for this run

# This workflow publishes a new version to the Github Registry.
#
# @author Armin Schnabel
# @version 1.1.0
# @since 5.0.0
name: Gradle Publish
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout commit
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Add gradle.properties
run: |
# Use the repository's automatically set up token to publish to the registry
cp gradle.properties.template gradle.properties
echo "githubUser=${{ github.actor }}" >> gradle.properties
echo "githubToken=${{ secrets.GITHUB_TOKEN }}" >> gradle.properties
# versionName is required to publish artifacts to Github Registry
- name: Set versionName
run: |
sed -i "s/cyfaceAndroidBackendVersion = \"0.0.0\"/cyfaceAndroidBackendVersion = \"${{ github.ref_name }}\"/g" build.gradle
- name: Publish with Gradle
run: ./gradlew publishAll
# Automatically mark this tag as release on Github
- name: Mark tag as release on Github
uses: actions/create-release@v1
id: create_release
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
# Release tags of format `1.2.3-beta1 / -alpha1 / -test1` are considered a pre-release
prerelease: ${{ contains(github.ref, 'test') || contains(github.ref, 'alpha') || contains(github.ref, 'beta') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}