From 3d31d336266e298d39201d7ede44edb32e0cc3d7 Mon Sep 17 00:00:00 2001 From: u Date: Sun, 30 Jul 2023 23:04:26 +0200 Subject: [PATCH] fix: release workflow --- .github/workflows/release.yml | 10 +++++++--- src/detect.js | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9b7bd18..56d1a06 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,8 +22,11 @@ jobs: name: release runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 # v3 - - uses: actions/setup-node@v3 # v3 + - name: Setup Repo + uses: actions/checkout@v3 # v3 + + - name: Setup Node + uses: actions/setup-node@v3 # v3 with: cache: npm node-version: lts/* @@ -32,7 +35,8 @@ jobs: - run: npm audit signatures - run: npm run build - - run: npx semantic-release + - name: Release + run: npx semantic-release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/src/detect.js b/src/detect.js index 081825b..cb3977f 100644 --- a/src/detect.js +++ b/src/detect.js @@ -31,8 +31,8 @@ const languages = [ ['java', [/^import\s+java/gm, 500]], ['asm', [/^(section|global main|extern|\t(call|mov|ret))/gm, 100]], ['css', [/^(@import|@page|@media|(\.|#)[a-z]+)/gm, 20]], - ['json', [/\b(true|false|null|\{})\b|\"[a-z]\"+:/g, 10]], - ['yaml', [/^(\s+)?[a-z]+:/gm, 10]] + ['json', [/\b(true|false|null|\{})\b|\"[^"]+\":/g, 10]], + ['yaml', [/^(\s+)?[a-z][a-z0-9]*:/gmi, 10]] ] /**