1
0
mirror of https://github.com/darkzoul5/YoutubePlaylistSync.git synced 2026-07-03 12:34:00 +03:00

Remove determine-next-tag job and update package upload steps to use CI_COMMIT_TAG for versioning

This commit is contained in:
2025-10-13 15:54:48 +03:00
parent fce9b8cdd1
commit 79c3742528
+8 -47
View File
@@ -10,46 +10,8 @@ on:
types: [published] types: [published]
jobs: 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: windows-package:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: determine-next-tag
steps: steps:
- name: Checkout code - name: Checkout code
uses: https://gitea.com/actions/checkout@v5 uses: https://gitea.com/actions/checkout@v5
@@ -93,19 +55,18 @@ jobs:
# Zip everything # Zip everything
cd "$WORKSPACE/dist/windows" 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" cd "$WORKSPACE"
- name: Upload Windows release - name: Upload Windows release
uses: https://gitea.com/actions/gitea-release-action@v1 uses: https://gitea.com/actions/gitea-release-action@v1
with: with:
files: ${GITEA_WORKSPACE:-$PWD}/yt-playlist-windows-${{ needs.determine-next-tag.outputs.next_tag }}.zip files: ${GITEA_WORKSPACE:-$PWD}/yt-playlist-windows-${CI_COMMIT_TAG}.zip
tag_name: ${{ needs.determine-next-tag.outputs.next_tag }} tag_name: ${CI_COMMIT_TAG}
name: ${{ needs.determine-next-tag.outputs.next_tag }} name: ${CI_COMMIT_TAG}
linux-package: linux-package:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: determine-next-tag
steps: steps:
- name: Checkout code - name: Checkout code
uses: https://gitea.com/actions/checkout@v5 uses: https://gitea.com/actions/checkout@v5
@@ -163,12 +124,12 @@ jobs:
# Zip everything at top level # Zip everything at top level
cd "$WORKSPACE/dist/linux" 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" cd "$WORKSPACE"
- name: Upload Linux release - name: Upload Linux release
uses: https://gitea.com/actions/gitea-release-action@v1 uses: https://gitea.com/actions/gitea-release-action@v1
with: with:
files: ${GITEA_WORKSPACE:-$PWD}/yt-playlist-linux-${{ needs.determine-next-tag.outputs.next_tag }}.zip files: ${GITEA_WORKSPACE:-$PWD}/yt-playlist-linux-${CI_COMMIT_TAG}.zip
tag_name: ${{ needs.determine-next-tag.outputs.next_tag }} tag_name: ${CI_COMMIT_TAG}
name: ${{ needs.determine-next-tag.outputs.next_tag }} name: ${CI_COMMIT_TAG}