chore: add readme version update to github actions (#55)

* chore: add readme version update to github actions

* Update changelog

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Alexandre Pasmantier 2024-11-22 13:24:00 +01:00 committed by GitHub
parent 21cdaaee42
commit 0f6aad952f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 46 additions and 1 deletions

33
.github/workflows/update_readme.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: update_readme
permissions:
contents: write
on:
push:
tags:
- '[v]?[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
jobs:
update-readme-version:
name: Update README.md with new version
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Update README.md
run: |
sed -i "/television/s/[0-9]\+\.[0-9]\+\.[0-9]\+/${{ github.event.ref }}/g" README.md
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Commit changes
run: |
git checkout ${{ steps.extract_branch.outputs.branch }}
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
set +e
git add README.md
git commit -m "Update README.md with new version"
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git ${{ steps.extract_branch.outputs.branch }}

View File

@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
## [unreleased]
### 🐛 Bug Fixes
- Quote file names that contain spaces when printing them to stdout (#51)
### ⚙️ Miscellaneous Tasks
- Add readme version update to github actions
## [0.5.1] - 2024-11-20
### 📚 Documentation
- Add instructions for installing on Arch Linux (#43)
@ -14,7 +24,9 @@ All notable changes to this project will be documented in this file.
- Add CHANGELOG.md (#44)
- *(config)* Default configuration now uses 100% of terminal screen space (#47)
- *(changelog)* Udpate changelog and add corresponding makefile command
- *(changelog)* Udpate changelog and add corresponding makefile command (#53)
- *(actions)* Remove changelog update from the main branch
- Bump version to 0.5.1
## [0.5.0] - 2024-11-18