From 5e6882495321c31330701b2e2a2120a4fe5bb0eb Mon Sep 17 00:00:00 2001 From: leafus Date: Sun, 29 Sep 2024 05:08:54 +0200 Subject: [PATCH] Update .gitea/workflows/build.yaml --- .gitea/workflows/build.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 4ef7e8e..6e17530 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -48,6 +48,11 @@ jobs: - name: Get latest version and increment id: create_version run: | + if [ "${{ env.main_go_modified }}" = "false" ]; then + echo "No changes in main.go, skipping version increment and release creation." + exit 0 + fi + git fetch --tags latest_version=$(git tag | sort -V | tail -n 1 || echo "v0.0.0") @@ -70,6 +75,7 @@ jobs: - name: Create Release id: create_release + if: env.main_go_modified == 'true' uses: actions/create-release@v1 with: tag_name: ${{ env.new_version }} @@ -85,6 +91,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.TOKEN }} - name: Upload Go binaries to release + if: env.main_go_modified == 'true' uses: softprops/action-gh-release@v1 with: files: |