Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make release:trigger compatible with GITHUB_TOKEN #598

Closed
kazupon opened this issue Jan 7, 2020 · 2 comments · Fixed by #612
Closed

Make release:trigger compatible with GITHUB_TOKEN #598

kazupon opened this issue Jan 7, 2020 · 2 comments · Fixed by #612

Comments

@kazupon
Copy link
Contributor

kazupon commented Jan 7, 2020

Describe the bug
Unfortunately, GITHUB_TOKEN cannot be used to authenticate git commands:
In my github action workflow, it could not release with release:trigger. 😞

The following error occurred in the GitHub action workflow:

}
    at exec (/home/runner/work/poeditor-service-provider/poeditor-service-provider/node_modules/shipjs-lib/dist/index.esm.js:1700:11)
    at default (/home/runner/work/poeditor-service-provider/poeditor-service-provider/node_modules/shipjs/src/util/run.js:22:20)
    at refs.forEach.ref (/home/runner/work/poeditor-service-provider/poeditor-service-provider/node_modules/shipjs/src/helper/gitPush.js:23:7)
    at Array.forEach (<anonymous>)
    at gitPush (/home/runner/work/poeditor-service-provider/poeditor-service-provider/node_modules/shipjs/src/helper/gitPush.js:22:10)
    at runStep (/home/runner/work/poeditor-service-provider/poeditor-service-provider/node_modules/shipjs/src/step/release/gitPush.js:15:7)
    at runStep (/home/runner/work/poeditor-service-provider/poeditor-service-provider/node_modules/shipjs/src/step/runStep.js:11:10)
    at default (/home/runner/work/poeditor-service-provider/poeditor-service-provider/node_modules/shipjs/src/step/release/gitPush.js:7:3)
    at release (/home/runner/work/poeditor-service-provider/poeditor-service-provider/node_modules/shipjs/src/flow/release.js:54:3)
    at process._tickCallback (internal/process/next_tick.js:68:7)

See the https://github.com/kazupon/poeditor-service-provider/runs/377176890

To Reproduce
Steps to reproduce the behavior:

  1. create the PR with release:prepare (minor release v0.6.0 intlify/poeditor-service-provider#36)
  2. Label it with release
  3. Merge it
  4. Triggers release workflow with github action, and run the release:trigger (https://github.com/kazupon/poeditor-service-provider/commit/3dace81b5cc45dbf16e8b56758e027104d37c43b/checks?check_suite_id=387723670)

Environment (please complete the following information):

  • environment: (your local machine, CircleCI, Travis CI, etc.)
  • node -v: 10.x
  • yarn -v: 1.19.2
  • Ship.js version: 0.13.1

Additional context

@jeetiss
Copy link
Contributor

jeetiss commented Jan 7, 2020

Hi @kazupon
Actually this is bug in github actions that fixed in current version, but as I see you run v1 actions
https://github.com/kazupon/poeditor-service-provider/blob/master/.github/workflows/release.yml#L14-L15

All work nice with latest version of github actions https://github.com/jeetiss/try-shipjs/commit/dc141c3bda63f5ff68a868458f71ed90c9510522/checks?check_suite_id=388868397

If you wanna use v1 actions, you can add custom secret GH_TOKEN and replace original token with them in actions as workaround:

      - run: npm run release:trigger
        env:
          GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

@kazupon
Copy link
Contributor Author

kazupon commented Jan 8, 2020

@jeetiss
Thanks!
I'll try to it with master version, when I'll plan to release. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants