From 4197b4f52e1448fedfd5e07f512e21e5000a3ff2 Mon Sep 17 00:00:00 2001 From: neru Date: Fri, 20 Mar 2026 23:03:19 -0300 Subject: [PATCH] build: add semantic versioning --- .github/workflows/build.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee0c73f..ed826bc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,6 @@ name: Build on: push: branches: [ "main", "master" ] - tags: [ "v*" ] pull_request: branches: [ "main", "master" ] workflow_dispatch: @@ -11,11 +10,20 @@ on: jobs: build: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 with: submodules: recursive + fetch-depth: 0 + fetch-tags: true + + - name: Configure version information + id: calculate-version + if: ${{ github.event_name == 'push' }} + uses: bitshifted/git-auto-semver@v2 + with: + create_tag: true + initial_version: 0.2.0 - name: Setup Tools Cache id: tools-cache @@ -88,7 +96,9 @@ jobs: path: unlocker.zip - name: Create Gitea Release - if: startsWith(github.ref, 'refs/tags/') + if: ${{ github.event_name == 'push' }} uses: akkuman/gitea-release-action@v1 with: files: unlocker.zip + tag_name: v${{ steps.calculate-version.outputs.version-string }} + name: Release v${{ steps.calculate-version.outputs.version-string }}