From ca0aa8ab68421e8128abc6009033d41fc23413cc Mon Sep 17 00:00:00 2001 From: Jonah Lawrence Date: Mon, 6 Dec 2021 01:07:59 +0200 Subject: [PATCH] fix: dispatch event and commit branch --- .github/workflows/download-button.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/download-button.yml b/.github/workflows/download-button.yml index a477590..afdd4e4 100644 --- a/.github/workflows/download-button.yml +++ b/.github/workflows/download-button.yml @@ -2,6 +2,8 @@ name: "Download Button Action" on: release: + types: + - published workflow_dispatch: jobs: @@ -24,10 +26,13 @@ jobs: FORMAT="zip" VERSION="${{ steps.get-latest-release.outputs.tag_name }}" COLOR="blue" - UPDATE=$(cat README.md | perl -0777 -pe 's#()(?:.|\n)*()#${1}\n[![Download ${FORMAT}](https://custom-icon-badges.herokuapp.com/badge/-Download-${COLOR}?style=for-the-badge&logo=download&logoColor=white "Download ${FORMAT}")](https://github.com/${GITHUB_USER}/${REPO}/archive/${VERSION}.${FORMAT})\n${2}#g') + BEGIN_TAG="" + END_TAG="" + UPDATE=$(cat README.md | perl -0777 -pe 's#(${BEGIN_TAG})(?:.|\n)*(${END_TAG})#${1}\n[![Download ${FORMAT}](https://custom-icon-badges.herokuapp.com/badge/-Download-${COLOR}?style=for-the-badge&logo=download&logoColor=white "Download ${FORMAT}")](https://github.com/${GITHUB_USER}/${REPO}/archive/${VERSION}.${FORMAT})\n${2}#g') echo "${UPDATE}" > README.md - uses: EndBug/add-and-commit@v7 with: - message: 'docs: Bump version to ${{ steps.get-latest-release.outputs.tag_name }}' + message: 'docs(readme): Bump download button version to ${{ steps.get-latest-release.outputs.tag_name }}' default_author: github_actions + branch: main