Skip to content

v0.4.0 🌈

v0.4.0 🌈 #5

Workflow file for this run

name: Release
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Read latest tag
id: read_tag
run: |
TAG=$(git describe --tags --abbrev=0)
echo "Latest tag: $TAG"
echo "TAG=${TAG}" >> $GITHUB_OUTPUT
- name: Update version in pyproject.toml
env:
TAG: ${{ steps.read_tag.outputs.TAG }}
run: |
sed -i "s/^version = .*/version = \"$TAG\"/" pyproject.toml
cat pyproject.toml
- name: Update README.md
env:
TAG: ${{ steps.read_tag.outputs.TAG }}
run: |
sed -i "s/kvankova\/code-embedder@.*/kvankova\/code-embedder@$TAG/" README.md
cat README.md
- name: Commit and push changes
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git checkout main
git add pyproject.toml README.md
git commit -m "Bump version to $TAG"
git push origin main