From 79c3742528b3c6c751b552a69633e95322eccaf8 Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Mon, 13 Oct 2025 15:54:48 +0300 Subject: [PATCH] Remove determine-next-tag job and update package upload steps to use CI_COMMIT_TAG for versioning --- .gitea/workflows/release.yml | 55 ++++++------------------------------ 1 file changed, 8 insertions(+), 47 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 2d8b5ec..09b7d07 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -10,46 +10,8 @@ on: types: [published] jobs: - determine-next-tag: - runs-on: ubuntu-latest - outputs: - next_tag: ${{ steps.set_tag.outputs.next_tag }} - steps: - - name: Checkout code - uses: https://gitea.com/actions/checkout@v5 - - - name: Determine next version tag - id: set_tag - run: | - git fetch --tags - - LATEST_TAG=$(git tag -l "v*.*.*" | sort -V | tail -n1) - echo "Latest tag: $LATEST_TAG" - - if [ -z "$LATEST_TAG" ]; then - NEXT_TAG="v0.0.1" - else - PATCH=$(echo $LATEST_TAG | awk -F. '{print $3}') - MAJOR=$(echo $LATEST_TAG | awk -F. '{print $1}' | tr -d 'v') - MINOR=$(echo $LATEST_TAG | awk -F. '{print $2}') - PATCH=$((PATCH+1)) - NEXT_TAG="v${MAJOR}.${MINOR}.${PATCH}" - fi - - echo "Next tag: $NEXT_TAG" - echo "next_tag=$NEXT_TAG" >> $GITHUB_OUTPUT - - - name: Create new tag - run: | - git config user.name "Gitea Actions" - git config user.email "actions@gitea.local" - git tag ${{ steps.set_tag.outputs.next_tag }} - git push origin ${{ steps.set_tag.outputs.next_tag }} - - windows-package: runs-on: ubuntu-latest - needs: determine-next-tag steps: - name: Checkout code uses: https://gitea.com/actions/checkout@v5 @@ -93,19 +55,18 @@ jobs: # Zip everything cd "$WORKSPACE/dist/windows" - zip -r "$WORKSPACE/yt-playlist-windows-${{ needs.determine-next-tag.outputs.next_tag }}.zip" * + zip -r "$WORKSPACE/yt-playlist-windows-${CI_COMMIT_TAG}.zip" * cd "$WORKSPACE" - name: Upload Windows release uses: https://gitea.com/actions/gitea-release-action@v1 with: - files: ${GITEA_WORKSPACE:-$PWD}/yt-playlist-windows-${{ needs.determine-next-tag.outputs.next_tag }}.zip - tag_name: ${{ needs.determine-next-tag.outputs.next_tag }} - name: ${{ needs.determine-next-tag.outputs.next_tag }} + files: ${GITEA_WORKSPACE:-$PWD}/yt-playlist-windows-${CI_COMMIT_TAG}.zip + tag_name: ${CI_COMMIT_TAG} + name: ${CI_COMMIT_TAG} linux-package: runs-on: ubuntu-latest - needs: determine-next-tag steps: - name: Checkout code uses: https://gitea.com/actions/checkout@v5 @@ -163,12 +124,12 @@ jobs: # Zip everything at top level cd "$WORKSPACE/dist/linux" - zip -r "$WORKSPACE/yt-playlist-linux-${{ needs.determine-next-tag.outputs.next_tag }}.zip" * + zip -r "$WORKSPACE/yt-playlist-linux-${CI_COMMIT_TAG}.zip" * cd "$WORKSPACE" - name: Upload Linux release uses: https://gitea.com/actions/gitea-release-action@v1 with: - files: ${GITEA_WORKSPACE:-$PWD}/yt-playlist-linux-${{ needs.determine-next-tag.outputs.next_tag }}.zip - tag_name: ${{ needs.determine-next-tag.outputs.next_tag }} - name: ${{ needs.determine-next-tag.outputs.next_tag }} \ No newline at end of file + files: ${GITEA_WORKSPACE:-$PWD}/yt-playlist-linux-${CI_COMMIT_TAG}.zip + tag_name: ${CI_COMMIT_TAG} + name: ${CI_COMMIT_TAG} \ No newline at end of file