bugfixes #133
This file contains hidden or 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: Auto Tag | |
| on: | |
| push: | |
| branches: | |
| - trackedcooldowns | |
| jobs: | |
| tag: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.ORBIT_PAT }} | |
| - name: Calculate version and create tag | |
| run: | | |
| # Count all commits on branch | |
| VERSION="$(git rev-list --count HEAD)-alpha" | |
| echo "Calculated version: $VERSION" | |
| # Check if tag already exists | |
| if git rev-parse "$VERSION" >/dev/null 2>&1; then | |
| echo "Tag $VERSION already exists, skipping" | |
| exit 0 | |
| fi | |
| # Configure git for tagging | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| # Create and push tag | |
| git tag -a "$VERSION" -m "Release $VERSION" | |
| git push origin "$VERSION" |