Create icon font #115
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
name: Create icon font | |
# Used to allow moon-icons-base workflow to trigger this workflow and also manual triggering. | |
on: | |
workflow_dispatch: | |
inputs: | |
description: | |
default: '🤖 Figma Icons Update' | |
required: true | |
type: string | |
# So only the latest run is executed. Used to avoid concurrency issues as Figma webhook can be spammy at times. | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
create_icon_font: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 21 | |
- name: Convert icons to font | |
env: | |
MOON_GH_TOKEN: ${{ secrets.MDS_AUTOMATION_PAT }} | |
run: npm run create-icon-font | |
working-directory: ./importer | |
- name: Generate Dart classes | |
run: npm run convert-css-to-dart | |
working-directory: ./importer | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
# inputs.description gets relayed as payload from moon-icons-base workflow | |
commit-message: 'feat: ${{ inputs.description }}' | |
title: 'feat: ${{ inputs.description }}' | |
branch: update-icon-font |