Skip to content

[CTM-1130] implement workflow to create a GH release #35

[CTM-1130] implement workflow to create a GH release

[CTM-1130] implement workflow to create a GH release #35

Workflow file for this run

name: Build
on:
workflow_dispatch:
workflow_call:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '20'
- name: Decide Build Number
id: decide_build_number
run: |
VERSION=$(awk -F "'" '/archiveVersion =/{print $2}' build-jar.gradle)
echo "Found version: $VERSION"
echo "marketing_build_version=$VERSION" >> $GITHUB_OUTPUT
- name: Write version to file
run: |
echo "${{ steps.decide_build_number.outputs.marketing_build_version }}" > version.txt
- name: Upload version
uses: actions/upload-artifact@v3
with:
name: version
path: version.txt
- name: Invoke Gradle for aar
run: |
chmod +x gradlew
./gradlew --console plain clean build assemble -x test
- name: Archive aar file
uses: actions/upload-artifact@v3
env:
MARKETING_VERSION: ${{ steps.decide_build_number.outputs.marketing_build_version }}
with:
name: 'cumulocity-client-kotlin-aar'
path: 'build/outputs/aar/*.aar'
- name: Invoke Gradle for jar
run: |
chmod +x gradlew
./gradlew --console plain -b build-jar.gradle clean build -x test
- name: Archive jar file
uses: actions/upload-artifact@v3
env:
MARKETING_VERSION: ${{ steps.decide_build_number.outputs.marketing_build_version }}
with:
name: 'cumulocity-client-kotlin-jar'
path: 'build/libs/*.jar'