From 8faa77b3d33e741b7491cad211a60313002f582b Mon Sep 17 00:00:00 2001 From: smdn Date: Wed, 11 Dec 2024 21:40:04 +0900 Subject: [PATCH] add manual dispatcher for invoking the workflow for republishing releases --- .../run-publish-release-dispatch.yml | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 .github/workflows/run-publish-release-dispatch.yml diff --git a/.github/workflows/run-publish-release-dispatch.yml b/.github/workflows/run-publish-release-dispatch.yml new file mode 100644 index 0000000..c1980ad --- /dev/null +++ b/.github/workflows/run-publish-release-dispatch.yml @@ -0,0 +1,90 @@ +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: "2022 smdn " + +name: Manual dispatcher for 'Publish release' (publish-release.yml) + +permissions: + contents: write + +on: + workflow_dispatch: + inputs: + workflow_runs_on: + description: "The OS label which run the workflow on. (ex: ubuntu-latest, ubuntu-24.04)" + required: false + type: string + default: "ubuntu-latest" + + release_tag: + description: "The name of the tag for the release to be created." + required: true + type: string + + release_note_url: + description: "The URL of Gist where the release note for the package has been published." + required: true + type: string + + release_prerelease: + description: "The boolean value that indicates whether the release should be published as a prerelease or not." + required: false + type: boolean + default: false + + release_draft: + description: "The boolean value that indicates whether the release should be published as a draft or not." + required: false + type: boolean + default: false + + package_id: + description: "The ID of the released package." + required: true + type: string + + package_version: + description: "The version of the released package in SemVer format." + required: true + type: string + + package_branch: + description: "The name of the branch from which the released package was generated." + required: true + type: string + + package_prevver_tag: + description: "The name of the tag that identifies the previous version of the released package." + required: false + type: string + default: '' + + package_available_nuget_org: + description: "The boolean value that indicates whether the released package has been pushed to NuGet.org or not." + required: false + type: boolean + default: false + + dry_run: + description: "If true, performs a trial run." + required: false + type: boolean + default: false + +jobs: + run-publish-release-target: + uses: smdn/Smdn.Net.EchonetLite/.github/workflows/publish-release.yml@republish-releases + with: + workflow_runs_on: ${{ github.event.inputs.workflow_runs_on }} + release_tag: ${{ github.event.inputs.release_tag }} + release_note_url: ${{ github.event.inputs.release_note_url }} + release_prerelease: ${{ fromJson(github.event.inputs.release_prerelease) }} + release_draft: ${{ fromJson(github.event.inputs.release_draft) }} + package_id: ${{ github.event.inputs.package_id }} + package_version: ${{ github.event.inputs.package_version }} + package_branch: ${{ github.event.inputs.package_branch }} + package_prevver_tag: ${{ github.event.inputs.package_prevver_tag }} + package_available_nuget_org: ${{ fromJson(github.event.inputs.package_available_nuget_org) }} + dry_run: ${{ fromJson(github.event.inputs.dry_run) }} + secrets: + token_gist: ${{ secrets.PUBLISH_NEW_RELEASE }} + token_new_release: ${{ secrets.PUBLISH_NEW_RELEASE }}