Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[filigran-web][Icons] Automate icon creation #19

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions .github/workflows/icons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,14 @@ jobs:
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git checkout -b update-icons-branch
git checkout -B update-icons-branch
git add .
git commit -m "Update icons and build artifacts"
git push origin update-icons-branch
git push --set-upstream origin update-icons-branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.TOKEN_GITHUB }}
branch: update-icons-branch
title: "Update icons and build artifacts"
body: "This PR was automatically created by GitHub Actions after building the icons."
base: main
run: gh pr create --title "Update icons and build artifacts" --body "This PR updates the icons and build artifacts." --base main --head update-icons-branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions packages/filigran-icon/script/fetchFromFigma.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ async function run () {
console.error('The Figma file ID is not defined, you need to set an environment variable `FIGMA_FILE_ID` to run the script');
return;
}

fetchFigmaFile()
.then(data => getComponentsFromNode(data))
.then(components => getIllustrationName(components))
Expand Down