Skip to content

Commit

Permalink
Create update-readme.yml
Browse files Browse the repository at this point in the history
Created a simple workflow that updates the version number in the Readme.md after each relaese
  • Loading branch information
SzamosiMate authored Jan 6, 2025
1 parent b4ebb01 commit 249eae8
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/update-readme.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 249eae8

Please sign in to comment.