diff --git a/action.yml b/action.yml index 9a9769a..b4af263 100644 --- a/action.yml +++ b/action.yml @@ -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. @@ -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 }}'" @@ -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)