chore: set VERSION to 2.1.1 #1
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: version-update | |
on: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- 'VERSION' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
fetch-depth: 0 | |
- name: Commit files | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
export VERSION=$(cat VERSION |tr -d "\n\r") | |
echo "Found ${VERSION} version" | |
sed -i "s/\"__ai4_template\":.*/\"__ai4_template\": \"ai4-template\/${VERSION}\",/I" cookiecutter.json | |
git commit -a -m "Update ai4-template version in the cookiecutter.json for ${VERSION}" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
branch: ${{ github.head_ref }} |