Skip to content

Commit

Permalink
Update build and release workflow to include release package creation…
Browse files Browse the repository at this point in the history
… and upload
  • Loading branch information
valentin-marquez committed Oct 15, 2024
1 parent 6d0a9a9 commit f95b4d0
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,23 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements/prod.txt
pip install pyinstaller
- name: Build with PyInstaller
run: pyinstaller nikke_ocr.spec

- name: Prepare release package
run: |
mkdir NIKKE-OCR-release
xcopy /E /I dist\NIKKE-OCR NIKKE-OCR-release\NIKKE-OCR
xcopy /E /I resources NIKKE-OCR-release\resources
copy launcher.py NIKKE-OCR-release\
copy requirements\prod.txt NIKKE-OCR-release\requirements.txt
- name: Zip release package
run: Compress-Archive -Path .\NIKKE-OCR-release -DestinationPath .\NIKKE-OCR.zip

- name: Create Release
if: startsWith(github.ref, 'refs/tags/v')
id: create_release
Expand All @@ -46,13 +57,13 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/NIKKE-OCR/NIKKE-OCR.exe
asset_name: NIKKE-OCR.exe
asset_content_type: application/octet-stream
asset_path: ./NIKKE-OCR.zip
asset_name: NIKKE-OCR.zip
asset_content_type: application/zip

- name: Upload artifact for debugging
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
uses: actions/upload-artifact@v3
with:
name: NIKKE-OCR
path: ./dist/NIKKE-OCR/NIKKE-OCR.exe
path: ./NIKKE-OCR-release

0 comments on commit f95b4d0

Please sign in to comment.