π Fontawesome #133
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: π Fontawesome | |
# https://stackoverflow.com/a/58468828 | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 2 * * 0" | |
defaults: | |
run: | |
working-directory: src/Projektanker.Icons.Avalonia.FontAwesome | |
jobs: | |
sync: | |
name: π Sync Fontawesome | |
runs-on: ubuntu-latest | |
outputs: | |
modified: ${{ steps.git-check.outputs.modified }} | |
steps: | |
- name: π Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: π₯ Download icons.json | |
run: wget -O Assets/icons.json https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/metadata/icons.json | |
- name: βΉ git status | |
run: git status | |
- name: π Check for modified files | |
id: git-check | |
run: echo modified=$([ -z "`git status --porcelain`" ] && echo "false" || echo "true") >> $GITHUB_OUTPUT | |
- name: π£ Setup .NET 7.0 | |
if: ${{ steps.git-check.outputs.modified == 'true' }} | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.x | |
- name: π§ͺ dotnet test | |
if: ${{ steps.git-check.outputs.modified == 'true' }} | |
run: dotnet test --configuration Release | |
- name: π¬ Commit and push | |
if: ${{ steps.git-check.outputs.modified == 'true' }} | |
run: | | |
git config --global user.name '${{ secrets.GIT_USER }}' | |
git config --global user.email '${{ secrets.GIT_EMAIL }}' | |
git commit -am "feat(FontAwesome): π icons changed." | |
git push | |
release-please: | |
name: β¨ Release Please | |
needs: sync | |
if: ${{ needs.sync.outputs.modified == 'true' }} | |
uses: ./.github/workflows/call-release-please.yml | |
secrets: | |
nuget_api_key: ${{ secrets.NUGET_API_KEY }} |