Skip to content

Commit

Permalink
feat: allow specifying custom release-plz source for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
zvolin committed Jun 9, 2024
1 parent 7566221 commit 7ff0a56
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ inputs:
token:
description: "Token used to publish to the cargo registry"
required: false
tool-repository:
description: "Build custom release-plz for development or testing. Specifies the repository url passed to git clone."
required: false
tool-rev:
description: "Build custom release-plz for development or testing. Specifies the revision passed to git checkout."
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 All @@ -50,10 +56,26 @@ branding:
runs:
using: "composite"
steps:
- name: Install binaries
- name: Install cargo semver-checks
uses: taiki-e/install-action@v2
with:
tool: [email protected]
- name: Install release-plz
if: ${{ ! inputs.tool-repository }}
uses: taiki-e/install-action@v2
with:
tool: [email protected], release-plz@${{ inputs.version }}
tool: release-plz@${{ inputs.version }}
- name: Build custom release-plz
if: ${{ inputs.tool-repository }}
shell: bash
run: |
git clone "${{ inputs.tool-repository }}" ../release-plz
cd ../release-plz
if [[ -n "${{ inputs.tool-rev }}" ]]
then
git checkout "${{ inputs.tool-rev }}"
fi
cargo install --path crates/release_plz
- name: Configure git user from GitHub token
uses: MarcoIeni/[email protected]
- name: Run release-plz
Expand Down

0 comments on commit 7ff0a56

Please sign in to comment.