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

fix: replace GH_TOKEN with GITHUB_TOKEN #568

Merged
merged 2 commits into from
Dec 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/shipjs/src/step/setup/CI/addGitHubActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
fi
- run: npm run release:trigger
env:
GITHUB_TOKEN: \${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: \${{ secrets.NPM_AUTH_TOKEN }}
SLACK_INCOMING_HOOK: \${{ secrets.SLACK_INCOMING_HOOK }}
`,
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
git config --global user.name "<%= gitUserName %>"
- run: npm run release:prepare -- --yes --no-browse
env:
GITHUB_TOKEN: \${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}
SLACK_INCOMING_HOOK: \${{ secrets.SLACK_INCOMING_HOOK }}

create_done_comment:
Expand Down Expand Up @@ -212,7 +212,7 @@ jobs:
git config --global user.name "<%= gitUserName %>"
- run: npm run release:prepare -- --yes --no-browse
env:
GITHUB_TOKEN: \${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}
SLACK_INCOMING_HOOK: \${{ secrets.SLACK_INCOMING_HOOK }}
`,
{ baseBranch, cronExpr, gitUserName, gitUserEmail }
Expand Down
19 changes: 2 additions & 17 deletions website/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,26 +124,11 @@ Setup a GitHub token to allow Ship.js(**at CircleCI**) to create a git tag and p

## Setup GitHub Actions

If you are using GitHub Actions, you need to setup the following tokens:
If you are using GitHub Actions, you need to setup the NPM token to release package to NPM:

- NPM token: To release package to NPM
- GitHub token: To create release notes and tags

### NPM Token

1. Login at [https://www.npmjs.com/](https://www.npmjs.com/), click your profile icon and go to "Tokens".
1. Login at [https://www.npmjs.com/](https://www.npmjs.com/), click your profile icon and go to "Auth Tokens".
2. Click "Create New Token", make sure the access level is "Read and Publish" and copy the token.
3. At your GitHub repo, go to "Settings" → "Secrets".
4. Click "Add a new secret".
- Name: `NPM_AUTH_TOKEN`
- Value: Paste the token from clipboard.

### GitHub Token

1. Go to https://github.com/settings/tokens/new
2. Check "repo(Full control of private repositories)"
3. Generate/copy the token
4. At your GitHub repo, go to "Settings" → "Secrets".
5. Click "Add a new secret".
- Name: `GH_TOKEN`
- Value: Paste the token from clipboard.