diff --git a/action.yml b/action.yml index f86cdc1..c4105ea 100644 --- a/action.yml +++ b/action.yml @@ -6,8 +6,9 @@ inputs: description: "An API token for the PyPI repository specified by `pypi_repository`" required: true github_token: - description: "A GitHub API token (to publish GitHub releases and comment on resolved issues)" - required: true + description: "A GitHub API token to publish GitHub releases and comment on resolved issues" + default: ${{ github.token }} + required: false pypi_repository: description: "The repository to upload your Python package to (e.g., `https://upload.pypi.org/legacy/` for PyPI, or `https://test.pypi.org/legacy/` for Test PyPI)" diff --git a/readme.md b/readme.md index 9d53b5e..b49fdf9 100644 --- a/readme.md +++ b/readme.md @@ -36,7 +36,6 @@ A shareable semantic-release configuration and composite GitHub Action for Pytho - uses: bjoluc/semantic-release-config-poetry@v2 with: pypi_token: ${{ secrets.PYPI_TOKEN }} - github_token: ${{ secrets.GITHUB_TOKEN }} ``` - If you are not using GitHub Actions, configure a release job in your CI like this: @@ -49,10 +48,10 @@ A shareable semantic-release configuration and composite GitHub Action for Pytho The shareable semantic-release configuration exposed by this package requires the following environment variables. When using the GitHub action, each environment variable can be set via its corresponding lower-case input variable (e.g., `pypi_token` for `PYPI_TOKEN`). -| Environment variable | Description | -| -------------------- | ------------------------------------------------------------------------------ | -| `PYPI_TOKEN` | An API token for the PyPI repository specified by `PYPI_REPOSITORY` | -| `GITHUB_TOKEN` | A GitHub API token (to publish GitHub releases and comment on resolved issues) | +| Environment variable | Description | +| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `PYPI_TOKEN` | An API token for the PyPI repository specified by `PYPI_REPOSITORY` | +| `GITHUB_TOKEN` | A GitHub API token to publish GitHub releases and comment on resolved issues. The `github_token` Action input is optional and defaults to the value of the `GITHUB_TOKEN` secret. | Furthermore, the following optional environment variables can be set: