From c0d0f0cad63eaf8d775084a3e172c5ef792fac3e Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 4 Aug 2024 07:46:44 +0100 Subject: [PATCH] feat: add support for specifying backend --- action.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 3ffdfff..d5ffe62 100644 --- a/action.yml +++ b/action.yml @@ -11,6 +11,10 @@ inputs: config: description: "Config file location. If not present, the default 'release-plz.toml' is used." required: false + backend: + description: "Forge backend. Valid values: 'github', 'gitea'" + default: "github" + required: false manifest_path: description: "Path to the Cargo.toml of the project you want to update. If not provided, release-plz will use the Cargo.toml of the @@ -51,11 +55,11 @@ runs: using: "composite" steps: - name: Install binaries - uses: taiki-e/install-action@v2 + uses: https://github.com/taiki-e/install-action@v2 with: tool: cargo-semver-checks@0.32, release-plz@${{ inputs.version }} - name: Configure git user from GitHub token - uses: MarcoIeni/git-config@v0.1 + uses: https://github.com/MarcoIeni/git-config@v0.1 - name: Run release-plz id: release-plz shell: bash @@ -76,6 +80,14 @@ runs: TOKEN="" fi + if [[ -n "${{ inputs.backend }}" ]] + then + echo "using backend '${{ inputs.backend }}'" + BACKEND="--backend ${{ inputs.backend }}" + else + BACKEND="" + fi + if [[ -n "${{ inputs.registry }}" ]] then echo "using registry '${{ inputs.registry }}'" @@ -105,6 +117,7 @@ runs: ${CONFIG_PATH}\ ${ALT_REGISTRY}\ ${MANIFEST_PATH}\ + ${BACKEND}\ -o json) echo "release_pr_output: $release_pr_output" prs=$(echo $release_pr_output | jq -c .prs) @@ -129,6 +142,7 @@ runs: ${CONFIG_PATH}\ ${ALT_REGISTRY}\ ${MANIFEST_PATH}\ + ${BACKEND}\ ${TOKEN}\ -o json) echo "release_output: $release_output"