-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created a simple workflow that updates the version number in the Readme.md after each relaese
- Loading branch information
1 parent
b4ebb01
commit 249eae8
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |