mirror of
https://github.com/ful1e5/apple_cursor.git
synced 2025-05-22 03:05:22 -04:00
🚀 Github Action 'build'
This commit is contained in:
parent
e4aa2ccbee
commit
f4e1a7377a
12 changed files with 37 additions and 39 deletions
54
.github/workflows/build.yml
vendored
54
.github/workflows/build.yml
vendored
|
@ -27,6 +27,11 @@ jobs:
|
|||
sudo apt install libx11-dev libxcursor-dev libpng-dev
|
||||
continue-on-error: false
|
||||
|
||||
- name: Set Up NodeJS 12.x
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "12.x"
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
|
@ -39,51 +44,44 @@ jobs:
|
|||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "12.x"
|
||||
- run: yarn install
|
||||
- run: yarn render
|
||||
|
||||
- name: Set up Python
|
||||
- name: Set up Python 3.8
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.x"
|
||||
python-version: "3.8"
|
||||
|
||||
- name: Cache pip dependencies
|
||||
uses: actions/cache@v2
|
||||
- name: Get pip cache directory path
|
||||
id: pip-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(pip cache dir)"
|
||||
|
||||
- uses: actions/cache@v2
|
||||
id: pip-cache # use this to check for `cache-hit` (`steps.pip-cache.outputs.cache-hit != 'true'`)
|
||||
with:
|
||||
# This path is specific to Ubuntu
|
||||
path: ~/.cache/pip
|
||||
# Look to see if there is a cache hit for the corresponding requirements file
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
|
||||
path: ${{ steps.pip-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install pip dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
continue-on-error: false
|
||||
|
||||
- name: Generating `macOSBigSur` Cursor Theme
|
||||
run: python build.py
|
||||
run: make
|
||||
|
||||
- name: Compressing Artifacts
|
||||
run: |
|
||||
tar -cvzf logs.tar.gz build.log
|
||||
tar -cvzf bitmaps.tar.gz bitmaps
|
||||
tar -cvzf macOSBigSur.tar.gz themes
|
||||
tar -cvzf macOSBigSur.tar.gz themes/macOSBigSur
|
||||
|
||||
- name: Uploading `bitmaps` artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: bitmaps
|
||||
path: bitmaps.tar.gz
|
||||
name: bitmaps/*
|
||||
path: bitmaps
|
||||
|
||||
- name: Uploading `macOSBigSur` Theme artifact
|
||||
- name: Uploading `macOSBigSur` UNIX Theme artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: macOSBigSur
|
||||
path: macOSBigSur.tar.gz
|
||||
|
||||
- name: Uploading `macOSBigSur` Windows Theme artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: macOSBigSur_Windows
|
||||
path: themes/macOSBigSur_Windows/*
|
||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,5 +1,5 @@
|
|||
########## Custom
|
||||
pngs
|
||||
bitmaps
|
||||
themes
|
||||
builder/files.txt
|
||||
|
||||
|
|
12
Makefile
12
Makefile
|
@ -9,21 +9,21 @@ root_dest := $(root)/$(theme)
|
|||
|
||||
all: clean render build
|
||||
|
||||
unix: clean render pngs
|
||||
unix: clean render bitmaps
|
||||
@cd builder && make build_unix
|
||||
|
||||
windows: clean render pngs
|
||||
windows: clean render bitmaps
|
||||
@cd builder && make build_windows
|
||||
|
||||
.PHONY: all
|
||||
|
||||
clean:
|
||||
@rm -rf pngs themes
|
||||
@rm -rf bitmaps themes
|
||||
|
||||
render: bitmap svg
|
||||
@cd bitmap && $(MAKE)
|
||||
render: bitmapper svg
|
||||
@cd bitmapper && $(MAKE)
|
||||
|
||||
build: pngs
|
||||
build: bitmaps
|
||||
@cd builder && $(MAKE)
|
||||
|
||||
.ONESHELL:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "apple_cursor_bitmap",
|
||||
"version": "1.0.7",
|
||||
"name": "apple_cursor_bitmapper",
|
||||
"version": "1.0.8",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"watch": "nodemon --inspect src/index.ts",
|
|
@ -4,7 +4,7 @@ import { readdirSync, existsSync } from "fs";
|
|||
// Directory resolve
|
||||
const projectRoot = path.resolve(__dirname, "../../");
|
||||
|
||||
const outDir = path.resolve(projectRoot, "pngs");
|
||||
const outDir = path.resolve(projectRoot, "bitmaps");
|
||||
const staticSvgDir = path.resolve(projectRoot, "svg", "static");
|
||||
const animatedSvgDir = path.resolve(projectRoot, "svg", "animated");
|
||||
|
|
@ -29,7 +29,7 @@ parser.add_argument(
|
|||
dest="png_dir",
|
||||
metavar="PNG",
|
||||
type=str,
|
||||
default="../pngs",
|
||||
default="../bitmaps",
|
||||
help="To change pngs directory. (default: %(default)s)",
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue