From 65cc36fd84bec655da26cae813c5da57dbb3be3b Mon Sep 17 00:00:00 2001 From: Allan Chain <36528777+AllanChain@users.noreply.github.com> Date: Thu, 14 Nov 2024 19:04:46 +0800 Subject: [PATCH] ci: lint code on regular push --- .github/workflows/release.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a83b505..f1094e2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,6 +14,7 @@ permissions: jobs: release: + name: ${{ startsWith(github.ref, 'refs/heads/') && 'Build' || 'Release' }} runs-on: ubuntu-latest env: GITHUB_TOKEN: ${{ secrets.GitHub_TOKEN }} @@ -32,8 +33,7 @@ jobs: run: npm install -f - name: Build - run: | - npm run build + run: npm run build - name: Create artifact if: startsWith(github.ref, 'refs/heads/') @@ -42,6 +42,10 @@ jobs: name: arXiv-workflow-for-zotero path: build/zotero-arxiv-workflow.xpi + - name: Lint code + if: startsWith(github.ref, 'refs/heads/') + run: npm run lint + - name: Release to GitHub if: startsWith(github.ref, 'refs/tags/') run: |