Skip to content

Merge pull request #133 from adevinta/add-moon-icon #69

Merge pull request #133 from adevinta/add-moon-icon

Merge pull request #133 from adevinta/add-moon-icon #69

name: 📦 Deliver icons to Adevinta/spark-android
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "assets/spark/icons/*"
env:
DIST: "build/android/dist/spark/icons"
jobs:
deliver_icons_to_spark_android:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: true
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: lts/Hydrogen
cache: "npm"
- name: Install svgo
run: npm -g install [email protected]
- name: Cleanup dist
run: |
rm -rf "$DIST"
mkdir -p "$DIST"
- name: Run svg2avd.main.kts
run: ./spark-android/scripts/svg2avd/svg2avd.main.kts --input="assets/spark/icons" --output="$DIST" --precision=2 --prefix="spark_icons_" --copyright="spark-android/scripts/svg2avd/COPYRIGHT.xml"
- name: Deliver Icons To Spark Android
uses: cpina/[email protected]
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY_SPARK_ANDROID }}
with:
source-directory: ${{ env.DIST }}
destination-github-username: "adevinta"
destination-repository-name: "spark-android"
user-email: ${{ secrets.API_GITHUB_COMMIT_EMAIL }}
commit-message: |
chore(avd): update icons
See ORIGIN_COMMIT from $GITHUB_REF
target-branch: chore-updated-icons
create-target-branch-if-needed: true
target-directory: "spark-icons/src/main/res/drawable"