Skip to content

Commit

Permalink
fix: npm publish
Browse files Browse the repository at this point in the history
  • Loading branch information
itsjavi committed Oct 19, 2024
1 parent 5db739c commit b9c2115
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions .github/actions/setup-project/action.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
name: "Setup project"
description: "Sets up project with dependencies and credentials"
name: 'Setup project'
description: 'Sets up project with dependencies and credentials'

env:
NODE_VERSION: 22
PNPM_VERSION: 9.12.2

runs:
using: "composite"
using: 'composite'
steps:
- name: "Setup PNPM"
- name: 'Setup PNPM'
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
run_install: false

- name: "Setup Node.js"
- name: 'Setup Node.js'
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
# registry-url: https://npm.pkg.github.com
cache: "pnpm"
cache-dependency-path: "./pnpm-lock.yaml"
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
cache-dependency-path: './pnpm-lock.yaml'

- name: "Setup cache for node_modules"
- name: 'Setup cache for node_modules'
uses: actions/cache@v4
with:
path: "**/node_modules"
path: '**/node_modules'
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: "Install project dependencies"
- name: 'Install project dependencies'
shell: bash
run: pnpm install --frozen-lockfile
2 changes: 1 addition & 1 deletion .github/workflows/publish-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
# NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm version --no-git-tag-version "${{ env.PACKAGE_VERSION }}"
pnpm publish --no-git-checks --tag "${{ env.PACKAGE_TAG }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
# NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm publish --no-git-checks

- name: "Push new version to git"
Expand Down

0 comments on commit b9c2115

Please sign in to comment.