Skip to content

AND-136: add :gears:kotlin :gears:compose, update ci #145

AND-136: add :gears:kotlin :gears:compose, update ci

AND-136: add :gears:kotlin :gears:compose, update ci #145

Workflow file for this run

name: CI
on:
push:
branches: [main, feature/AND-81-compose-ktx]
# Release tag format is [module-name]-v[version]-[sub-version]
# For example: fragment-ktx-v1.3.5-0, compose-gears-v.1.1.1-1
tags:
- '*-ktx-v*-[0-9]+'
- '*-gears-v*-[0-9]+'
pull_request:
branches: [main]
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Run Check
run: ./gradlew check -xlint
- name: Run Detekt
run: ./gradlew detektAll detektReleaseAll
publish:
name: Publish gears
needs: check
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Get module name from tag
id: get-module-name
run: |
tag=${GITHUB_REF#refs/tags/}
module=$(echo "${tag/-*-v*}")
namespace=$(echo $tag | grep -o -P '(?<=-).*(?=-v)')
echo "module=$module" >> "$GITHUB_OUTPUT"
echo "namespace=$namespace" >> "$GITHUB_OUTPUT"
echo $GITHUB_OUTPUT
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Run Publish
run: echo namespace = ${{ steps.get-module-name.outputs.namespace }} module = ${{ steps.get-module-name.outputs.module }}
env:
ORG_GRADLE_PROJECT_githubPackagesUsername: ${{ github.actor }}
ORG_GRADLE_PROJECT_githubPackagesPassword: ${{ secrets.GITHUB_TOKEN }}