ci: move src/ -> scripts/, deno.json to repo root (#332)
This commit is contained in:
1 parent
f977c5a64c
commit
790e7cb83c
21 files changed
+21
-26
No files matched your search
@@ -9,7 +9,7 @@ on:
|
|||||||
paths: ["**/*.ts"]
|
paths: ["**/*.ts"]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DENO_DIR: deno_cache
|
DENO_DIR: /tmp/deno_cache
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deno-check:
|
deno-check:
|
||||||
@@ -27,11 +27,10 @@ jobs:
|
|||||||
- name: Cache Deno dependencies
|
- name: Cache Deno dependencies
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
key: ${{ hashFiles('src/deno.lock') }}
|
key: ${{ hashFiles('./deno.lock') }}
|
||||||
path: ${{ env.DENO_DIR }}
|
path: ${{ env.DENO_DIR }}
|
||||||
|
|
||||||
- name: Check
|
- name: Check
|
||||||
working-directory: src
|
|
||||||
run: |
|
run: |
|
||||||
deno lint
|
deno lint
|
||||||
deno check **/*.ts
|
deno check **/*.ts
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- "src/**/*"
|
- "scripts/**/*"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DENO_DIR: deno_cache
|
DENO_DIR: /tmp/deno_cache
|
||||||
HAS_USERSTYLES_TOKEN: ${{ secrets.USERSTYLES_TOKEN != '' }}
|
HAS_USERSTYLES_TOKEN: ${{ secrets.USERSTYLES_TOKEN != '' }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -38,12 +38,11 @@ jobs:
|
|||||||
- name: Cache Deno dependencies
|
- name: Cache Deno dependencies
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
key: ${{ hashFiles('src/deno.lock') }}
|
key: ${{ hashFiles('./deno.lock') }}
|
||||||
path: ${{ env.DENO_DIR }}
|
path: ${{ env.DENO_DIR }}
|
||||||
|
|
||||||
- name: Generate health files
|
- name: Generate health files
|
||||||
working-directory: ./src
|
run: deno task ci:generate
|
||||||
run: deno task generate
|
|
||||||
|
|
||||||
- name: Push changes
|
- name: Push changes
|
||||||
uses: stefanzweifel/git-auto-commit-action@v5
|
uses: stefanzweifel/git-auto-commit-action@v5
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ on:
|
|||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DENO_DIR: deno_cache
|
DENO_DIR: /tmp/deno_cache
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
@@ -25,9 +25,8 @@ jobs:
|
|||||||
- name: Cache Deno dependencies
|
- name: Cache Deno dependencies
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
key: ${{ hashFiles('src/deno.lock') }}
|
key: ${{ hashFiles('./deno.lock') }}
|
||||||
path: ${{ env.DENO_DIR }}
|
path: ${{ env.DENO_DIR }}
|
||||||
|
|
||||||
- name: Run Lint
|
- name: Run Lint
|
||||||
working-directory: src
|
|
||||||
run: deno task lint
|
run: deno task lint
|
||||||
@@ -4,10 +4,10 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- "src/userstyles.yml"
|
- "scripts/userstyles.yml"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DENO_DIR: deno_cache
|
DENO_DIR: /tmp/deno_cache
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sync-maintainers:
|
sync-maintainers:
|
||||||
@@ -27,12 +27,11 @@ jobs:
|
|||||||
- name: Cache Deno dependencies
|
- name: Cache Deno dependencies
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
key: ${{ hashFiles('src/deno.lock') }}
|
key: ${{ hashFiles('./deno.lock') }}
|
||||||
path: ${{ env.DENO_DIR }}
|
path: ${{ env.DENO_DIR }}
|
||||||
|
|
||||||
- name: Sync maintainers
|
- name: Sync maintainers
|
||||||
if: ${{ github.repository == 'catppuccin/userstyles' && github.ref == 'refs/heads/main' }}
|
if: ${{ github.repository == 'catppuccin/userstyles' && github.ref == 'refs/heads/main' }}
|
||||||
working-directory: ./src
|
run: deno task ci:sync-maintainers
|
||||||
run: deno task sync-maintainers
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.USERSTYLES_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.USERSTYLES_TOKEN }}
|
||||||
Vendored
-1
@@ -4,7 +4,6 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"deno.enable": true,
|
"deno.enable": true,
|
||||||
"deno.config": "./src/deno.json",
|
|
||||||
|
|
||||||
"[less]": {
|
"[less]": {
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"imports": {
|
"imports": {
|
||||||
"@/": "./",
|
"@/": "./scripts/",
|
||||||
"std/": "https://deno.land/[email protected]/",
|
"std/": "https://deno.land/[email protected]/",
|
||||||
"catppuccin-repo/": "https://raw.githubusercontent.com/catppuccin/catppuccin/91d6b5433730103c504dcf43583b594e418ee7c1/",
|
"catppuccin-repo/": "https://raw.githubusercontent.com/catppuccin/catppuccin/91d6b5433730103c504dcf43583b594e418ee7c1/",
|
||||||
"@actions/core": "npm:@actions/[email protected]",
|
"@actions/core": "npm:@actions/[email protected]",
|
||||||
@@ -11,10 +11,10 @@
|
|||||||
"less": "npm:[email protected]"
|
"less": "npm:[email protected]"
|
||||||
},
|
},
|
||||||
"tasks": {
|
"tasks": {
|
||||||
"generate": "./generate/main.ts",
|
"ci:generate": "deno run -A ./scripts/generate/main.ts",
|
||||||
"lint": "./lint/main.ts",
|
"ci:sync-maintainers": "deno run -A ./scripts/sync-maintainers/main.ts",
|
||||||
"lint:fix": "./lint/main.ts --fix",
|
"lint": "deno run -A ./scripts/lint/main.ts",
|
||||||
"sync-maintainers": "./sync-maintainers/main.ts",
|
"lint:fix": "deno task lint --fix",
|
||||||
"update-types": "deno run -A 'npm:json-schema-to-typescript' ./userstyles.schema.json types/userstyles.d.ts"
|
"update-types": "deno run -A 'npm:json-schema-to-typescript' ./scripts/userstyles.schema.json ./scripts/types/userstyles.d.ts"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Generated
File renamed without changes.
File renamed without changes.
@@ -41,7 +41,7 @@ const validate = ajv.compile<Metadata>(schema);
|
|||||||
const validatePorts = ajv.compile<PortMetadata>(portsSchema);
|
const validatePorts = ajv.compile<PortMetadata>(portsSchema);
|
||||||
|
|
||||||
const userstylesYaml = Deno.readTextFileSync(
|
const userstylesYaml = Deno.readTextFileSync(
|
||||||
path.join(REPO_ROOT, "src/userstyles.yml"),
|
path.join(REPO_ROOT, "scripts/userstyles.yml"),
|
||||||
);
|
);
|
||||||
const userstylesData = parseYaml(userstylesYaml);
|
const userstylesData = parseYaml(userstylesYaml);
|
||||||
if (!validate(userstylesData)) {
|
if (!validate(userstylesData)) {
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -16,7 +16,7 @@ const ajv = new Ajv.default();
|
|||||||
const validate = ajv.compile<UserstylesSchema>(schema);
|
const validate = ajv.compile<UserstylesSchema>(schema);
|
||||||
|
|
||||||
const userstylesYaml = Deno.readTextFileSync(
|
const userstylesYaml = Deno.readTextFileSync(
|
||||||
path.join(REPO_ROOT, "src/userstyles.yml"),
|
path.join(REPO_ROOT, "scripts/userstyles.yml"),
|
||||||
);
|
);
|
||||||
const userstylesData = parseYaml(userstylesYaml);
|
const userstylesData = parseYaml(userstylesYaml);
|
||||||
if (!validate(userstylesData)) {
|
if (!validate(userstylesData)) {
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -479,4 +479,4 @@ userstyles:
|
|||||||
answer: "It's available in case you have an OLED display. If you have one, you might want to enable this."
|
answer: "It's available in case you have an OLED display. If you have one, you might want to enable this."
|
||||||
current-maintainers: [*isabelroses]
|
current-maintainers: [*isabelroses]
|
||||||
past-maintainers: [*elkrien]
|
past-maintainers: [*elkrien]
|
||||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/catppuccin/userstyles/main/src/userstyles.schema.json
|
# yaml-language-server: $schema=https://raw.githubusercontent.com/catppuccin/userstyles/main/scripts/userstyles.schema.json
|
||||||
Reference in new issue
Block a user