Skip to content

Commit

Permalink
feat: allow specifying custom cargo token (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoieni authored Apr 28, 2024
1 parent 35a0061 commit ef5e66e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ inputs:
description: "Release-plz version to use. It must be an existing git tag name. For example `release-plz-v0.2.45`. (Default: `latest`)."
default: "release-plz-v0.3.63"
required: false
token:
description: "Token used to publish to the cargo registry"
required: false
outputs:
# Useful for when https://github.com/MarcoIeni/release-plz/issues/1029 is implemented.
# For now, it just returns an array with `pr` in it.
Expand Down Expand Up @@ -71,6 +74,15 @@ runs:
else
CONFIG_PATH=""
fi
if [[ -n "${{ inputs.token }}" ]]
then
echo "using custom registry token'"
TOKEN="--token ${{ inputs.token }}"
else
TOKEN=""
fi
if [[ -n "${{ inputs.registry }}" ]]
then
echo "using registry '${{ inputs.registry }}'"
Expand Down Expand Up @@ -124,6 +136,7 @@ runs:
${CONFIG_PATH}\
${ALT_REGISTRY}\
${MANIFEST_PATH}\
${TOKEN}\
-o json)
echo "release_output: $release_output"
releases=$(echo $release_output | jq -c .releases)
Expand Down

0 comments on commit ef5e66e

Please sign in to comment.