Skip to content

Commit

Permalink
add working directory in actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mayank1513 committed Aug 4, 2023
1 parent 4f065ab commit f65a85f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/publish-to-npm-on-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/nextjs-themes
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand All @@ -16,17 +19,17 @@ jobs:
- run: npm i -g pnpm && pnpm i --filter nextjs-themes
name: Install dependencies
- name: Test
run: ls && cd ./packages/nextjs-themes && pwd && npm test
run: npm test
- name: Publish to npm
run: npm build && npm publish-package && npm publish-package2
run: pnpm build && pnpm publish-package && pnpm publish-package2
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

- uses: actions/setup-node@v3
with:
registry-url: https://npm.pkg.github.com/
- name: Publish to GitHub Public Repository
run: cd packages/nextjs-themes && npm publish-gpr && npm publish-gpr2
run: pnpm publish-gpr && pnpm publish-gpr2
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

Expand All @@ -36,15 +39,15 @@ jobs:
with:
registry-url: https://registry.npmjs.org
- name: Publish to npm
run: cd packages/nextjs-themes && npm build && npm publish-package && npm publish-package2
run: pnpm build && pnpm publish-package && pnpm publish-package2
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

- uses: actions/setup-node@v3
with:
registry-url: https://npm.pkg.github.com/
- name: Publish to GitHub Public Repository
run: cd packages/nextjs-themes && npm publish-gpr && npm publish-gpr2
run: pnpm publish-gpr && pnpm publish-gpr2
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Setup Git
Expand Down
1 change: 0 additions & 1 deletion packages/nextjs-themes/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "nextjs-themes",
"private": true,
"author": "Mayank Kumar Chaudhari <https://mayank-chaudhari.vercel.app>",
"version": "0.0.1",
"main": "./dist/index.js",
Expand Down

0 comments on commit f65a85f

Please sign in to comment.