From 3596095fe730922475e633bba42dcec3f6b1f1e1 Mon Sep 17 00:00:00 2001 From: Nikola Irinchev Date: Tue, 8 Apr 2025 16:15:37 +0200 Subject: [PATCH] chore: clean up gha workflows --- .github/workflows/code_health.yaml | 31 +++++------------------------- .github/workflows/publish.yaml | 15 +++++++-------- 2 files changed, 12 insertions(+), 34 deletions(-) diff --git a/.github/workflows/code_health.yaml b/.github/workflows/code_health.yaml index 147ce8c8..708e75fc 100644 --- a/.github/workflows/code_health.yaml +++ b/.github/workflows/code_health.yaml @@ -6,37 +6,16 @@ on: - main pull_request: jobs: - prettier: + check-style: runs-on: ubuntu-latest steps: - uses: GitHubSecurityLab/actions-permissions/monitor@v1 - with: - config: ${{ vars.PERMISSIONS_CONFIG }} - - name: Checkout Repository - uses: actions/checkout@v2 - - uses: actions/setup-node@v4 - with: - node-version-file: package.json - cache: "npm" - - name: Install dependencies - run: | - npm ci - - run: | - npm run check:format - eslint: - runs-on: ubuntu-latest - steps: - - uses: GitHubSecurityLab/actions-permissions/monitor@v1 - with: - config: ${{ vars.PERMISSIONS_CONFIG }} - - name: Checkout Repository - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version-file: package.json cache: "npm" - name: Install dependencies - run: | - npm ci - - run: | - npm run check:lint + run: npm ci + - name: Run style check + run: npm run check diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 4497765e..02a99122 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -10,21 +10,20 @@ jobs: environment: Production steps: - uses: GitHubSecurityLab/actions-permissions/monitor@v1 - with: - config: ${{ vars.PERMISSIONS_CONFIG }} - - name: Checkout Repository - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version-file: package.json registry-url: "https://registry.npmjs.org" cache: "npm" - - name: Install dependencies + - name: Build package run: | npm ci - - env: + npm run build + - name: Publish to NPM + run: npm publish + env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Publish Github release run: | - npm publish - - run: | gh release create ${{ github.ref }} --title "${{ github.ref }}" --notes "Release ${{ github.ref }}" --generate-notes