mirror of
https://github.com/darkzoul5/YoutubePlaylistSync.git
synced 2026-07-03 12:34:00 +03:00
Refactor Windows package preparation to streamline tag extraction and zip file creation, improving environment variable usage.
This commit is contained in:
@@ -29,8 +29,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
REF="${GITEA_REF:-$GITHUB_REF}"
|
REF="${GITEA_REF:-$GITHUB_REF}"
|
||||||
TAG="${REF#refs/tags/}"
|
TAG="${REF#refs/tags/}"
|
||||||
echo "TAG=$TAG"
|
echo "TAG=$TAG" >> $GITHUB_ENV
|
||||||
echo "GITEA_REF=${GITEA_REF}"
|
|
||||||
|
|
||||||
- name: Prepare Windows package
|
- name: Prepare Windows package
|
||||||
run: |
|
run: |
|
||||||
@@ -58,17 +57,17 @@ jobs:
|
|||||||
# Remove temp files before zipping
|
# Remove temp files before zipping
|
||||||
rm -rf "$WORKSPACE_ROOT/dist/windows/ffmpeg_temp" "$WORKSPACE_ROOT/dist/windows/aria2-1.37.0-win-64bit-build1" "$WORKSPACE_ROOT/dist/windows/ffmpeg.zip" "$WORKSPACE_ROOT/dist/windows/aria2c.zip"
|
rm -rf "$WORKSPACE_ROOT/dist/windows/ffmpeg_temp" "$WORKSPACE_ROOT/dist/windows/aria2-1.37.0-win-64bit-build1" "$WORKSPACE_ROOT/dist/windows/ffmpeg.zip" "$WORKSPACE_ROOT/dist/windows/aria2c.zip"
|
||||||
|
|
||||||
# Zip everything
|
|
||||||
cd "$WORKSPACE_ROOT/dist/windows"
|
cd "$WORKSPACE_ROOT/dist/windows"
|
||||||
zip -r "$WORKSPACE_ROOT/yt-playlist-windows-${{ gitea.ref_name }}.zip" *
|
ZIP_NAME="yt-playlist-windows-${TAG}.zip"
|
||||||
cd "$WORKSPACE_ROOT"
|
zip -r "$WORKSPACE_ROOT/$ZIP_NAME" *
|
||||||
|
echo "ZIP_PATH=$WORKSPACE_ROOT/$ZIP_NAME" >> $GITHUB_ENV
|
||||||
|
|
||||||
- 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: $WORKSPACE_ROOT/yt-playlist-windows-$TAG.zip
|
files: ${{ env.ZIP_PATH }}
|
||||||
tag_name: $TAG
|
tag_name: ${{ env.TAG }}
|
||||||
name: $TAG
|
name: ${{ env.TAG }}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user