Build from commit 47a2b6c9d3a4dc0a6e93da67fdd09764240c9245 #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
run-name: Build from commit ${{ github.sha }} | |
on: | |
push: | |
branches: | |
- "**" | |
paths-ignore: | |
- "README.md" | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
check-latest: true | |
java-version: | | |
8 | |
21 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Setup Xcode version | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest | |
- name: Cache konan directory | |
uses: actions/cache@v4 | |
with: | |
path: ~/.konan | |
key: ${{ runner.os }}-konan-${{ hashFiles('*.gradle.kts', 'buildSrc/*') }} | |
restore-keys: | | |
${{ runner.os }}-konan- | |
- name: Build using Gradle | |
run: ./gradlew assemble -x :testapp:assemble | |
- name: Generate and save dependency graph | |
uses: gradle/actions/dependency-submission@v4 | |
with: | |
dependency-graph-exclude-projects: "^:testapp$" | |
- name: Prepare artifacts | |
run: | | |
mkdir build/artifacts | |
for buildDir in ./{core,font-symbols,"font-symbols/outlined","font-symbols/rounded","font-symbols/sharp"}/build/ | |
do | |
for file in "$buildDir"/libs/* | |
do | |
filename="${file##*/}" | |
extension="${filename##*.}" | |
filename="${filename%.*}" | |
cp "$file" build/artifacts/"$filename"-"$(git rev-parse --short HEAD)"."$extension" | |
done | |
for file in "$buildDir"/outputs/aar/* | |
do | |
filename="${file##*/}" | |
extension="${filename##*.}" | |
filename="${filename%.*}" | |
flavor="${filename##*-}" | |
filename="${filename%-*}" | |
version=$(grep -o "^VERSION_NAME=.*$" < gradle.properties | sed -E "s/VERSION_NAME=(.*)$/\\1/") | |
if [ "$flavor" = "release" ] | |
then | |
cp "$file" build/artifacts/"$filename"-android-"$version"-"$(git rev-parse --short HEAD)"."$extension" | |
fi | |
done | |
done | |
- name: Upload symbols.txt and fa-*.txt | |
uses: actions/upload-artifact@v4 | |
with: | |
name: icons | |
path: | | |
font-symbols/build/symbols.txt | |
font-fa/build/fa-brands.txt | |
font-fa/build/fa-regular.txt | |
font-fa/build/fa-solid.txt | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifacts | |
path: build/artifacts |