From 687baa1501300889a2f6d8acdc0b14c6e5fcdb6d Mon Sep 17 00:00:00 2001 From: existentialcoder Date: Tue, 11 Feb 2025 10:32:11 +0100 Subject: [PATCH] chore: minor fix in workflow yml --- .github/workflows/publish.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4252fa9..8ad1125 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,9 +4,6 @@ on: push: branches: - main - pull_request: - branches: - - main jobs: versioning: @@ -14,17 +11,18 @@ jobs: steps: # Checkout the code - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 # Set up Node.js environment - name: Set up Node.js uses: actions/setup-node@v3 with: node-version: '20' + registry-url: 'https://registry.npmjs.org/' - # Install dependencies + # Install all dependencies (including devDependencies for lint/test/build) - name: Install dependencies - run: yarn install --frozen-lockfile --production + run: yarn install # Run linting - name: Run lint @@ -43,14 +41,18 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: | - yarn release + run: yarn release - # Optionally, you can include a job to deploy to npm publish: - needs: release + needs: versioning runs-on: ubuntu-latest steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install production dependencies + run: yarn install --frozen-lockfile --production + # Publish to npm - name: Publish to npm run: yarn publish --non-interactive