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"]
|
||||
|
||||
env:
|
||||
DENO_DIR: deno_cache
|
||||
DENO_DIR: /tmp/deno_cache
|
||||
|
||||
jobs:
|
||||
deno-check:
|
||||
@@ -27,11 +27,10 @@ jobs:
|
||||
- name: Cache Deno dependencies
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: ${{ hashFiles('src/deno.lock') }}
|
||||
key: ${{ hashFiles('./deno.lock') }}
|
||||
path: ${{ env.DENO_DIR }}
|
||||
|
||||
- name: Check
|
||||
working-directory: src
|
||||
run: |
|
||||
deno lint
|
||||
deno check **/*.ts
|
||||
|
||||
@@ -4,10 +4,10 @@ on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- "src/**/*"
|
||||
- "scripts/**/*"
|
||||
|
||||
env:
|
||||
DENO_DIR: deno_cache
|
||||
DENO_DIR: /tmp/deno_cache
|
||||
HAS_USERSTYLES_TOKEN: ${{ secrets.USERSTYLES_TOKEN != '' }}
|
||||
|
||||
jobs:
|
||||
@@ -38,12 +38,11 @@ jobs:
|
||||
- name: Cache Deno dependencies
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: ${{ hashFiles('src/deno.lock') }}
|
||||
key: ${{ hashFiles('./deno.lock') }}
|
||||
path: ${{ env.DENO_DIR }}
|
||||
|
||||
- name: Generate health files
|
||||
working-directory: ./src
|
||||
run: deno task generate
|
||||
run: deno task ci:generate
|
||||
|
||||
- name: Push changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
|
||||
@@ -7,7 +7,7 @@ on:
|
||||
branches: [main]
|
||||
|
||||
env:
|
||||
DENO_DIR: deno_cache
|
||||
DENO_DIR: /tmp/deno_cache
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
@@ -25,9 +25,8 @@ jobs:
|
||||
- name: Cache Deno dependencies
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: ${{ hashFiles('src/deno.lock') }}
|
||||
key: ${{ hashFiles('./deno.lock') }}
|
||||
path: ${{ env.DENO_DIR }}
|
||||
|
||||
- name: Run Lint
|
||||
working-directory: src
|
||||
run: deno task lint
|
||||
@@ -4,10 +4,10 @@ on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- "src/userstyles.yml"
|
||||
- "scripts/userstyles.yml"
|
||||
|
||||
env:
|
||||
DENO_DIR: deno_cache
|
||||
DENO_DIR: /tmp/deno_cache
|
||||
|
||||
jobs:
|
||||
sync-maintainers:
|
||||
@@ -27,12 +27,11 @@ jobs:
|
||||
- name: Cache Deno dependencies
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: ${{ hashFiles('src/deno.lock') }}
|
||||
key: ${{ hashFiles('./deno.lock') }}
|
||||
path: ${{ env.DENO_DIR }}
|
||||
|
||||
- name: Sync maintainers
|
||||
if: ${{ github.repository == 'catppuccin/userstyles' && github.ref == 'refs/heads/main' }}
|
||||
working-directory: ./src
|
||||
run: deno task sync-maintainers
|
||||
run: deno task ci:sync-maintainers
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.USERSTYLES_TOKEN }}
|
||||
Vendored
-1
@@ -4,7 +4,6 @@
|
||||
},
|
||||
|
||||
"deno.enable": true,
|
||||
"deno.config": "./src/deno.json",
|
||||
|
||||
"[less]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"imports": {
|
||||
"@/": "./",
|
||||
"@/": "./scripts/",
|
||||
"std/": "https://deno.land/[email protected]/",
|
||||
"catppuccin-repo/": "https://raw.githubusercontent.com/catppuccin/catppuccin/91d6b5433730103c504dcf43583b594e418ee7c1/",
|
||||
"@actions/core": "npm:@actions/[email protected]",
|
||||
@@ -11,10 +11,10 @@
|
||||
"less": "npm:[email protected]"
|
||||
},
|
||||
"tasks": {
|
||||
"generate": "./generate/main.ts",
|
||||
"lint": "./lint/main.ts",
|
||||
"lint:fix": "./lint/main.ts --fix",
|
||||
"sync-maintainers": "./sync-maintainers/main.ts",
|
||||
"update-types": "deno run -A 'npm:json-schema-to-typescript' ./userstyles.schema.json types/userstyles.d.ts"
|
||||
"ci:generate": "deno run -A ./scripts/generate/main.ts",
|
||||
"ci:sync-maintainers": "deno run -A ./scripts/sync-maintainers/main.ts",
|
||||
"lint": "deno run -A ./scripts/lint/main.ts",
|
||||
"lint:fix": "deno task lint --fix",
|
||||
"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 userstylesYaml = Deno.readTextFileSync(
|
||||
path.join(REPO_ROOT, "src/userstyles.yml"),
|
||||
path.join(REPO_ROOT, "scripts/userstyles.yml"),
|
||||
);
|
||||
const userstylesData = parseYaml(userstylesYaml);
|
||||
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 userstylesYaml = Deno.readTextFileSync(
|
||||
path.join(REPO_ROOT, "src/userstyles.yml"),
|
||||
path.join(REPO_ROOT, "scripts/userstyles.yml"),
|
||||
);
|
||||
const userstylesData = parseYaml(userstylesYaml);
|
||||
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."
|
||||
current-maintainers: [*isabelroses]
|
||||
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