question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

failure in setting npm config in shipjs trigger

See original GitHub issue

Describe the bug npx shipjs trigger doesn’t work

To Reproduce Steps to reproduce the behavior:

  1. https://github.com/geospoc/v-mapbox/runs/1212948942 Check the workflow details, you’ll see

Expected behavior Ideally, ship.js trigger should publish the pkg to registry, but it doesn’t automatically publish to the registry.

Screenshots Screenshot 2020-10-06 at 7 15 41 PM

Environment (please complete the following information):

  • environment: GitHub actions
  • node -v: 10.22.1
  • npm -v or yarn -v: 6.14.6
  • Ship.js version: 0.22.0

Additional context NA

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
vinayakkulkarnicommented, Dec 30, 2020

Oh FYI, if anyone is facing an issue while publishing to GPR, here’s a sample Shipjs trigger .yml:

name: Ship js trigger
on:
  pull_request:
    types:
      - closed
jobs:
  build:
    name: Release
    runs-on: ubuntu-latest
    if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'releases/v')
    steps:
      - name: Checkout code 🛎
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
          ref: main

      - name: Setup node env 🏗
        uses: actions/setup-node@v2.1.4
        with:
          node-version: 14
          registry-url: 'https://npm.pkg.github.com'
          scope: '<@scope>'

      - name: Install dependencies 👨🏻‍💻
        run: npm ci
        env:
          NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Release pkg to registry ⚡️
        run: npx shipjs trigger
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          SLACK_INCOMING_HOOK: ${{ secrets.SLACK_INCOMING_HOOK }}

Apparently, NODE_AUTH_TOKEN is required for npm publish Ref: https://github.com/actions/setup-node/issues/52#issuecomment-546768916

1reaction
KnisterPetercommented, Oct 12, 2020

@eunjae-lee Thanks, I’ll report back when I do the next release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

config
If set to true, then npm will stubbornly refuse to install (or even consider installing) any package that claims to not be compatible...
Read more >
A Guide to npm: The Node.js Package Manager
Configuration settings in the .npmrc file can be modified and persisted using the CLI by running a command in this format: npm config...
Read more >
Configuring Jest
For example, with the following configuration jest will fail if there is less than 80% branch, line, and function coverage, or if there...
Read more >
shipjs-lib | Yarn - Package Manager
This is an internal library used by Ship.js. ... get correct remote branches (#883 (551dde0); setup: update circleci node version to v12 (#884...
Read more >
Configuring Vitest
vitest will read your root vite.config.ts when it is present to match with the plugins and setup as your Vite app. If you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found