Skip to content

Commit

Permalink
feat: auto-tag main on merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Shalev Avhar committed Nov 6, 2024
1 parent ddf2d8b commit 0644d30
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/tag-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Tag main branch
on:
push:
branches:
- main

jobs:
tag-main:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: tag main
run: |
# get tag from pyproject.toml
TAG=$(grep -E '^version = ".*"' pyproject.toml | cut -d'"' -f2)
git tag "v${TAG}"
git push origin main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 0644d30

Please sign in to comment.