diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index ecd8f3b..982f9d6 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -5,20 +5,24 @@ on: types: [created] workflow_dispatch: +env: + rootDir: ./packages/nextjs-cache-handler + jobs: publish-npm: runs-on: ubuntu-latest defaults: run: - working-directory: ./packages/nextjs-cache-handler + working-directory: ${{ env.rootDir }} steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + uses: actions/setup-node@v4 with: - node-version: 20 - registry-url: https://registry.npmjs.org/ - - run: npm ci + cache: npm + node-version: lts/* + cache-dependency-path: ${{ env.rootDir }}/package-lock.json + - run: npm i - run: npm publish env: NODE_AUTH_TOKEN: ${{secrets.npm_token}}