ci(update_readme): fix update_readme workflow (#63)

* ci(update_readme): fix `update_readme` workflow

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Alexandre Pasmantier 2024-11-24 00:50:03 +01:00 committed by Alexandre Pasmantier
parent edd9df4e29
commit dc36b2152d
4 changed files with 22 additions and 19 deletions

View File

@ -1,7 +1,13 @@
name: changelog
permissions:
contents: write
on:
pull_request:
push:
tags:
- '[v]?[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
jobs:
changelog:
@ -29,12 +35,12 @@ jobs:
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Commit
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 CHANGELOG.md
git commit -m "chore(changelog): update changelog (auto)"
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git ${{ steps.extract_branch.outputs.branch }}
- name: Create PR
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore(changelog): update changelog (auto)'
title: 'chore(changelog): update changelog (auto)'
body: 'This PR was created by a GitHub Action to update the changelog.'
branch: bot/auto-changelog-update
base: main

View File

@ -17,7 +17,7 @@ jobs:
fetch-depth: 0
- name: Update README.md
run: |
sed -i "/television/s/[0-9]\+\.[0-9]\+\.[0-9]\+/${{ github.event.ref }}/g" README.md
sed -i "/television/s/[0-9]\+\.[0-9]\+\.[0-9]\+/${{ github.ref_name }}/g" README.md
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
@ -29,5 +29,5 @@ jobs:
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 commit -m "docs(version): update README.md with new version"
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git ${{ steps.extract_branch.outputs.branch }}

View File

@ -7,7 +7,7 @@ All notable changes to this project will be documented in this file.
### 🐛 Bug Fixes
- Quote file names that contain spaces when printing them to stdout (#51)
- *(entry)* Preserve raw input
- *(entry)* Always preserve raw input + match ranges conversions (#62)
### 🚜 Refactor
@ -21,15 +21,12 @@ All notable changes to this project will be documented in this file.
- *(git)* Enforce conventional commits on git push with a hook (#61)
### 🧪 Testing
- Add tests for replace_non_printable and cleanup commented out code
### ⚙️ Miscellaneous Tasks
- Add readme version update to github actions (#55)
- *(version)* Bump workspace crates and television
- *(update_readme)* Fix `update_readme` workflow
- *(changelog)* Update changelog (auto)
- *(update_readme)* Fix `update_readme` workflow
### Build

View File

@ -29,8 +29,8 @@ brew install alexpasmantier/television/television
#### Debian-based (Debian, Ubuntu, Pop!_OS, Linux Mint, etc.)
```bash
curl -LO https://github.com/alexpasmantier/television/releases/download/0.5.0/television_0.5.0-1_amd64.deb
sudo dpkg -i television_0.5.0-1_amd64.deb
curl -LO https://github.com/alexpasmantier/television/releases/download/0.5.2/television_0.5.2-1_amd64.deb
sudo dpkg -i television_0.5.2-1_amd64.deb
```
#### Arch Linux
```bash