Skip to content

Commit

Permalink
Create update-icons.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dme-compunet committed Dec 25, 2024
1 parent de12703 commit 56ea6e8
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 9 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/update-icons.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Update Icon Collection

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Checkout
uses: actions/checkout@v4

- name: Checkout lucide-icons
run: git clone https://github.com/lucide-icons/lucide.git

- name: Run Generator
run: |
dotnet restore $GENERATOR_PROJECT_PATH
dotnet run --project $GENERATOR_PROJECT_PATH $LUCIDE_REPOSITORY_PATH $GENERATED_CS_FILES_PATH
env:
GENERATOR_PROJECT_PATH: ./src/LucideIcons.Generator
LUCIDE_REPOSITORY_PATH: ./lucide
GENERATED_CS_FILES_PATH: ./src/Lucide.Avalonia/

- name: Push Changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add ./src/Lucide.Avalonia/IconToGeometry.cs
git add ./src/Lucide.Avalonia/LucideIconKind.cs
git add ./src/Lucide.Avalonia/Metadata/LucideIconInfo.cs
git commit -m "✨ Update Icon Collection"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 10 additions & 9 deletions src/LucideIcons.Generator/LucideIcons.Generator.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SvgToXaml.Converter" Version="11.2.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="SvgToXaml.Converter" Version="11.2.0" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.88.8" />
</ItemGroup>

</Project>

0 comments on commit 56ea6e8

Please sign in to comment.