Skip to content

Update checkout and upload/download artifacts to v4. #57

Update checkout and upload/download artifacts to v4.

Update checkout and upload/download artifacts to v4. #57

Workflow file for this run

name: Build
on:
workflow_dispatch:
workflow_call:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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 (to be used in release.yml)
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@v4
with:
name: 'cumulocity-clients-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 publish -x test --debug
- name: Archive jar file
uses: actions/upload-artifact@v4
with:
name: 'cumulocity-clients-kotlin-jar'
path: 'build/libs/*.jar'
- name: Archive maven repo files
uses: actions/upload-artifact@v4
with:
name: 'cumulocity-clients-kotlin-maven'
path: 'build/mavenRepo/*'