-
-
Notifications
You must be signed in to change notification settings - Fork 17
66 lines (64 loc) · 2.33 KB
/
main.yml
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
60
61
62
63
64
65
66
on: workflow_dispatch
jobs:
export_cursor_theme:
runs-on: ubuntu-latest
name: Export the latest theme and its assets from the Figma file
env:
EXPORT_DIRECTORY: export
OUTPUT_DIRECTORY: theme
outputs:
version: ${{ steps.figma_export.outputs.version }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Export
id: figma_export
uses: phisch/cursor-theme-builder/action/[email protected]
with:
access_token: ${{ secrets.FIGMA_ACCESS_TOKEN }}
file_key: ${{ secrets.FIGMA_FILE_KEY }}
theme_name: Phinger Cursors
theme_author: Philipp Schaffrath (phisch)
theme_comment: Most likely the most over engineered cursor theme.
output_directory: ${{ env.EXPORT_DIRECTORY }}
- name: Replace theme
run: |
rm -rf $OUTPUT_DIRECTORY
mv $EXPORT_DIRECTORY $OUTPUT_DIRECTORY
- name: Commit and push latest theme
uses: EndBug/add-and-commit@v9
with:
add: ${{ env.OUTPUT_DIRECTORY }}
default_author: github_actor
message: "exported theme from figma file ${{ secrets.FIGMA_FILE_KEY }} version ${{ steps.figma_export.outputs.version }}"
build_cursor_theme_job:
runs-on: ubuntu-latest
name: Build cursor theme
needs: export_cursor_theme
env:
ARCHIVE_NAME: phinger-cursors-variants.tar.bz2
BUILD_DIRECTORY: build
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Build Cursor Theme
uses: phisch/cursor-theme-builder/action/[email protected]
with:
cursor_theme_json: theme/cursor-theme.json
output_directory: ${{ env.BUILD_DIRECTORY }}/themes
- name: Create artifact
working-directory: ${{ env.BUILD_DIRECTORY }}
run: tar -cjf ${{ env.ARCHIVE_NAME }} -C themes .
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: phinger-cursors-variants
path: ${{ env.BUILD_DIRECTORY }}/${{ env.ARCHIVE_NAME }}
- name: Draft Release
uses: softprops/action-gh-release@v2
with:
files: ${{ env.BUILD_DIRECTORY }}/${{ env.ARCHIVE_NAME }}
draft: true
tag_name: ${{ job.export_cursor_theme.outputs.version }}