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

AI: readd release job

This commit is contained in:
2026-03-07 19:25:54 +02:00
parent 4fc1f8999e
commit 585875c447
+88 -1
View File
@@ -214,4 +214,91 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: docker-image-latest name: docker-image-latest
path: docker-image-latest.tar path: docker-image-latest.tar
release:
runs-on: ubuntu-latest
needs: [build-windows-package, build-linux-package, build-docker-image]
env:
IMAGE_NAME: youtubeplaylistdownloader
steps:
- uses: actions/download-artifact@v4
with:
name: windows-zip
- uses: actions/download-artifact@v4
with:
name: linux-zip
- uses: actions/download-artifact@v4
with:
name: docker-image
- uses: actions/download-artifact@v4
with:
name: docker-image-latest
- name: Get version from tag
id: version
shell: bash
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
VERSION="${{ inputs.tag }}"
elif [ "${{ github.event_name }}" = "release" ]; then
VERSION="${{ github.event.release.tag_name }}"
else
VERSION="${{ github.ref_name }}"
fi
VERSION="${VERSION#v}"
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Set docker image names
run: |
echo "RELEASE_IMAGE=ghcr.io/${GITHUB_ACTOR}/youtubeplaylistdownloader:${{ steps.version.outputs.version }}" >> $GITHUB_ENV
echo "LATEST_IMAGE=ghcr.io/${GITHUB_ACTOR}/youtubeplaylistdownloader:latest" >> $GITHUB_ENV
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Load and push Docker release image
run: |
docker load -i docker-image/docker-image.tar
docker push $RELEASE_IMAGE
- name: Load and push Docker latest image
run: |
docker load -i docker-image-latest/docker-image-latest.tar
docker push $LATEST_IMAGE
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.version.outputs.version }}
release_name: ${{ steps.version.outputs.version }}
draft: true
- name: Upload Windows release asset
uses: actions/upload-release-asset@v2
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: windows-zip/yt-playlist-windows-${{ steps.version.outputs.version }}.zip
asset_name: yt-playlist-windows-${{ steps.version.outputs.version }}.zip
asset_content_type: application/zip
- name: Upload Linux release asset
uses: actions/upload-release-asset@v2
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: linux-zip/yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz
asset_name: yt-playlist-linux-${{ steps.version.outputs.version }}.tar.gz
asset_content_type: application/gzip
- name: Upload Docker release tar
uses: actions/upload-release-asset@v2
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: docker-image/docker-image.tar
asset_name: docker-image-${{ steps.version.outputs.version }}.tar
asset_content_type: application/x-tar
- name: Upload Docker latest tar
uses: actions/upload-release-asset@v2
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: docker-image-latest/docker-image-latest.tar
asset_name: docker-image-latest.tar
asset_content_type: application/x-tar