Skip to content

archive using compress_archive #18

archive using compress_archive

archive using compress_archive #18

Workflow file for this run

name: "Build & Release"
on:
push:
branches: main
jobs:
builds:
name: Build & Release
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
# Setup Python
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
cache: 'pip'
- run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install Pillow
pip install pyinstaller
# Build python script into a stand-alone exe
- name: Pyinstaller Build
run: |
pyinstaller Melodfy.spec
- name: Download 7zip
run: |
Invoke-WebRequest https://www.7-zip.org/a/7zr.exe -OutFile 7zr.exe
- name: Download ffmpeg-windows
run: |
Invoke-WebRequest https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.7z -OutFile ffmpeg-release-essentials.7z
./7zr.exe x ffmpeg-release-essentials.7z
mv ffmpeg-6.1.1-essentials_build/bin/ffmpeg.exe dist/Melodfy/_internal/
- name: Zip build
run: |
Compress-Archive -Path .\dist\Melodfy\ -DestinationPath .\dist\Melodfy_${{ runner.os }}_Build_${{ github.run_number }}.7z
# Uploads artifact
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: Melodfy_${{ runner.os }}_Build_v${{ github.run_number }}
path: |
dist/Melodfy_${{ runner.os }}_Build_${{ github.run_number }}.7z
# Uploads artifact
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: Melodfy_${{ runner.os }}_Build_${{ github.run_number }}
path: |
dist/Melodfy_${{ runner.os }}_Build_${{ github.run_number }}.7z
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "dist/Melodfy_${{ runner.os }}_Build_${{ github.run_number }}.7z"
tag: v1.0.0+${{github.run_number}}
token: ${{secrets.SECRET_KEY}}