chore(release): update version to 0.0.29 #46
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
name: Update Version | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
version: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }} | |
- name: Get previous version | |
id: previous_version | |
run: | | |
VERSION=$(grep "buster=" version.txt | cut -d'=' -f2) | |
echo "version=$VERSION" >> $GITHUB_OUTPUT | |
- name: Conventional Commit Check and Version Bump | |
id: version_bump | |
uses: mathieudutour/[email protected] | |
with: | |
github_token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }} | |
default_bump: false | |
dry_run: true | |
tag_prefix: "" | |
- name: Update version.txt | |
if: steps.version_bump.outputs.new_version != steps.previous_version.outputs.version | |
run: | | |
NEW_VERSION="${{ steps.version_bump.outputs.new_version }}" | |
sed -i "s/buster=.*/buster=$NEW_VERSION/" version.txt | |
- name: Commit and push if changed | |
if: steps.version_bump.outputs.new_version != steps.previous_version.outputs.version | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add version.txt | |
git commit -m "chore: bump version to ${{ steps.version_bump.outputs.new_version }}" | |
git push | |