From 249eae8586303abf1426a5e211a651d458ed1d89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szamosi=20M=C3=A1t=C3=A9?= <62789148+SzamosiMate@users.noreply.github.com> Date: Mon, 6 Jan 2025 21:58:07 +0100 Subject: [PATCH] Create update-readme.yml Created a simple workflow that updates the version number in the Readme.md after each relaese --- .github/workflows/update-readme.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/update-readme.yml diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml new file mode 100644 index 0000000..f5f8cdf --- /dev/null +++ b/.github/workflows/update-readme.yml @@ -0,0 +1,29 @@ +name: Update README with Release Version + +on: + release: + types: [published] + +jobs: + update-readme: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Extract Release Version + id: extract_version + run: echo "::set-output name=version::${GITHUB_REF#refs/tags/}" + + - name: Update README.md with New Version + run: | + sed -i "s/multi_conn_ac-[0-9.]*-py3-none-any\.whl/multi_conn_ac-${{ steps.extract_version.outputs.version }}-py3-none-any\.whl/" README.md + + - name: Commit and Push Changes + run: | + git config --local user.name "github-actions[bot]" + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git add README.md + git commit -m "Update README.md with version ${{ steps.extract_version.outputs.version }}" + git push