Skip to content

Commit

Permalink
Merge branch 'fix/102_add_npm_token' into try_node_auth_token_in_auto…
Browse files Browse the repository at this point in the history
…matic_release
  • Loading branch information
tyrann0us authored Aug 8, 2024
2 parents 93f0b4b + 44f1582 commit 2c5d178
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/automatic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ on:
GITHUB_USER_TOKEN:
description: Authentication token with write permission needed by the release bot (falls back to `GITHUB_TOKEN`).
required: false
NPM_REGISTRY_TOKEN:
description: Authentication token with write permission needed by NPM to release a package (falls back to GITHUB_TOKEN).
required: false

jobs:
release:
Expand Down Expand Up @@ -133,6 +136,7 @@ jobs:
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_USER_TOKEN != '' && secrets.GITHUB_USER_TOKEN || secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN != '' && secrets.NPM_REGISTRY_TOKEN || secrets.GITHUB_TOKEN }}
run: npx semantic-release

- name: Delete signing key files
Expand Down
15 changes: 8 additions & 7 deletions docs/automatic-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@ jobs:
### Secrets
| Name | Required | Default | Description |
|------------------------------|----------|---------|-----------------------------------------------------------------------------------------------------|
| `GITHUB_USER_EMAIL` | false | `''` | Email address for the GitHub user configuration |
| `GITHUB_USER_NAME` | false | `''` | Username for the GitHub user configuration |
| `GITHUB_USER_SSH_KEY` | false | `''` | Private SSH key associated with the GitHub user for the token passed as `GITHUB_USER_TOKEN` |
| `GITHUB_USER_SSH_PUBLIC_KEY` | false | `''` | Public SSH key associated with the GitHub user for the token passed as `GITHUB_USER_TOKEN` |
| `GITHUB_USER_TOKEN` | false | `''` | Authentication token with write permission needed by the release bot (falls back to `GITHUB_TOKEN`) |
| Name | Required | Default | Description |
|------------------------------|----------|---------|-------------------------------------------------------------------------------------------------------------------------------------|
| `GITHUB_USER_EMAIL` | false | `''` | Email address for the GitHub user configuration |
| `GITHUB_USER_NAME` | false | `''` | Username for the GitHub user configuration |
| `GITHUB_USER_SSH_KEY` | false | `''` | Private SSH key associated with the GitHub user for the token passed as `GITHUB_USER_TOKEN` |
| `GITHUB_USER_SSH_PUBLIC_KEY` | false | `''` | Public SSH key associated with the GitHub user for the token passed as `GITHUB_USER_TOKEN` |
| `GITHUB_USER_TOKEN` | false | `''` | Authentication token with write permission needed by the release bot (falls back to `GITHUB_TOKEN`) |
| `NPM_REGISTRY_TOKEN` | false | `''` | Authentication token with publish permission needed by the release bot to publish to the npm registry (falls back to GITHUB_TOKEN) |

**Example with configuration parameters:**

Expand Down

0 comments on commit 2c5d178

Please sign in to comment.