-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathaction.yml
More file actions
59 lines (55 loc) · 1.86 KB
/
Copy pathaction.yml
File metadata and controls
59 lines (55 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: 'Figma Cursor Theme Asset Export'
description: 'Downloads cursor theme sprites and generates a `cursor-theme.json` that can be used by the cursor theme builder.'
inputs:
access_token:
description: 'Your personal Figma access token.'
required: true
file_key:
description: 'The `key` of the Figma file containing the cursor theme. Can be found in the url to of a figma file. `https://www.figma.com/file/:key/:title`'
required: true
theme_name:
description: 'Name of the cursor theme.'
required: true
theme_author:
description: 'Author of the cursor theme.'
required: false
theme_comment:
description: 'Short comment or description of the cursor theme.'
required: false
output_directory:
description: 'Output directory for the `cursor-theme.json` and sprites.'
required: false
default: './figma-export'
outputs:
version:
description: 'The current version of the Figma file.'
value: ${{ steps.export.outputs.version }}
runs:
using: 'composite'
steps:
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
cache-dependency-path: .
- name: Install dependencies
working-directory: ${{ github.action_path }}
run: pnpm i
shell: bash
- name: Export cursor theme assets
id: export
working-directory: ${{ github.action_path }}
env:
INPUT_ACCESS_TOKEN: ${{ inputs.access_token }}
INPUT_FILE_KEY: ${{ inputs.file_key }}
INPUT_THEME_NAME: ${{ inputs.theme_name }}
INPUT_THEME_AUTHOR: ${{ inputs.theme_author }}
INPUT_THEME_COMMENT: ${{ inputs.theme_comment }}
INPUT_OUTPUT_DIRECTORY: ${{ github.workspace }}/${{ inputs.output_directory }}
run: node dist/main.js
shell: bash