docs: update README to use custom token for action-gh-release

Due to changes in the permissions of the default GITHUB_TOKEN secret,
updated the README example to recommend using a custom token (CUSTOM_GITHUB_TOKEN)
with appropriate "Contents" repository permissions.

See Issue https://github.com/softprops/action-gh-release/issues/572
This commit is contained in:
jim-junior 2025-01-13 12:38:35 +03:00
parent c43d7637b9
commit 854e3b4bbe

View file

@ -109,6 +109,10 @@ jobs:
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
with: with:
files: Release.txt files: Release.txt
env:
# note you'll typically need to create a fine-grained personal access token
# with "Contents" repository permissions (write)
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
``` ```
Below is an example of uploading more than one asset with a GitHub release Below is an example of uploading more than one asset with a GitHub release
@ -135,6 +139,10 @@ jobs:
files: | files: |
Release.txt Release.txt
LICENSE LICENSE
env:
# note you'll typically need to create a personal access token
# with "Contents" repository permissions (write)
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
``` ```
> **⚠️ Note:** Notice the `|` in the yaml syntax above ☝️. That lets you effectively declare a multi-line yaml string. You can learn more about multi-line yaml syntax [here](https://yaml-multiline.info) > **⚠️ Note:** Notice the `|` in the yaml syntax above ☝️. That lets you effectively declare a multi-line yaml string. You can learn more about multi-line yaml syntax [here](https://yaml-multiline.info)