debug ci #3
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: Release "afio" Font | |
on: | |
push: | |
branches: | |
- main | |
- ci/* | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Get current version from tags | |
id: get_version | |
run: | | |
# Get the latest tag, filter to versions with "v" prefix, sort them by version, and take the latest | |
git describe --tags --match "v[0-9]*" --abbrev=0 2>/dev/null | |
VERSION=$(git describe --tags --match "v[0-9]*" --abbrev=0 2>/dev/null || echo "v0.0.0") | |
echo "Current version: $VERSION" | |
echo "version=$VERSION" >> $GITHUB_ENV | |
- name: Bump patch version | |
id: bump_version | |
run: | | |
# Strip the "v" and split into major, minor, patch | |
VERSION=${{ env.version }} | |
VERSION_NUMBER=$(echo $VERSION | sed 's/v//') | |
MAJOR=$(echo $VERSION_NUMBER | cut -d. -f1) | |
MINOR=$(echo $VERSION_NUMBER | cut -d. -f2) | |
PATCH=$(echo $VERSION_NUMBER | cut -d. -f3) | |
NEW_VERSION="v$MAJOR.$MINOR.$((PATCH + 1))" | |
echo "New version: $NEW_VERSION" | |
echo "new_version=$NEW_VERSION" >> $GITHUB_ENV | |
- name: Tag the new version | |
run: | | |
git tag ${{ env.new_version }} | |
git push origin ${{ env.new_version }} |