{"id":13725468,"url":"https://github.com/primer/figma-action","last_synced_at":"2025-10-02T23:34:07.907Z","repository":{"id":45465101,"uuid":"168202740","full_name":"primer/figma-action","owner":"primer","description":"Export image assets from Figma to GitHub","archived":true,"fork":false,"pushed_at":"2020-11-13T18:51:03.000Z","size":34,"stargazers_count":162,"open_issues_count":0,"forks_count":28,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-16T00:34:02.401Z","etag":null,"topics":["action","figma","figma-api","github-action","github-actions"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/primer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-29T18:05:55.000Z","updated_at":"2024-12-26T02:40:52.000Z","dependencies_parsed_at":"2023-01-11T17:22:48.764Z","dependency_job_id":null,"html_url":"https://github.com/primer/figma-action","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primer%2Ffigma-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primer%2Ffigma-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primer%2Ffigma-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primer%2Ffigma-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/primer","download_url":"https://codeload.github.com/primer/figma-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235049009,"owners_count":18927715,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["action","figma","figma-api","github-action","github-actions"],"created_at":"2024-08-03T01:02:24.240Z","updated_at":"2025-10-02T23:34:07.448Z","avatar_url":"https://github.com/primer.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# GitHub action for exporting Figma components\n\n\u003e **NOTE**: This repository is no longer maintained.\n\n[![npm version](https://img.shields.io/npm/v/@primer/figma-action.svg)](https://www.npmjs.org/package/@primer/figma-action)\n\nA [GitHub action](https://github.com/features/actions) that will export [Figma](https://figma.com/) components from design files to your repository.\n\n## Usage\n\n**Example workflow**\n\n```workflow\nname: Export SVG from Figma\non: [push]\njobs:\n  all:\n    name: Figma Export\n    runs-on: ubuntu-latest\n    steps:\n      - uses: primer/figma-action@v1.0.0-alpha.3\n        with:\n          args: \"format=svg outputDir=./build/\"\n        env:\n          FIGMA_FILE_URL: \"https://www.figma.com/file/ZFjrph2HUwFK8Q3uEtJIu1PT/yourfilename\"\n          FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }}\n```\n\n### Variables\n\n**Secrets**\n\n`FIGMA_TOKEN` **(required)**\n\nThis token is used to access the [Figma API](https://www.figma.com/developers/docs#access-tokens). It's required to generate one so this action will work. It's recommended to set the token in a [secret token](https://help.github.com/articles/virtual-environments-for-github-actions#creating-and-using-secrets-encrypted-variables) in your repository.\n\n**env variables**\n\n`FIGMA_FILE_URL` **(required)**\n\nThis is the file url that you would like to export from. The action will search the file for [components](https://help.figma.com/article/66-components) and export them with your configurations.\n\n**Workflow args (optional)**\n\n* `format` – The export format for exporting from Figma. Options are `svg`, `jpg`, `png`. Default is `jpg`\n* `outputDir` – Where you would like the exported files to live. Default is `./build/`\n* `scale` – When choosing an image format `jpg` or `png` this is the export scale between `0.01` and `4` that will allow you to scale the image. Default is `1`.\n\n### Output\n\nThe output of this action lives in `./build/` by default, but can be configured. In addition to the files exported you will see a `data.json` file exported. This contains information about the exported components mapped by component `id`.\n\nThe directory will look like this:\n\n```\n./outputDir/\n  ├── format/\n  |     └── componentName.format\n  └── data.json\n```\n\nThe data.json file will look like this:\n\n```js\n{\n  \"0:639\": {\n    \"name\": \"plus\", // component name\n    \"id\": \"0:639\", // component figma id\n    \"key\": \"89696b0b52493acc8692546ac829bd4e334c63a2\", // component global figma id\n    \"file\": \"FP7lqd1V00LUaT5zvdklkkZr\", // figma file key\n    \"description\": \"keywords: add, new, more\", // figma component description\n    \"width\": 12, // width of the component frame\n    \"height\": 16, // height of the component frame\n    \"image\": \"https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/1/6d/1234\" // aws URL for the exported file\n  }\n}\n```\n\n## License\n\n[MIT](./LICENSE) \u0026copy; [GitHub](https://github.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprimer%2Ffigma-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprimer%2Ffigma-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprimer%2Ffigma-action/lists"}