Skip to content

Commit

Permalink
Update publish-installer-ai.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
NHLOCAL committed Oct 25, 2024
1 parent af740b7 commit 15e02cd
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions .github/workflows/publish-installer-ai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
tags:
- 'v*'
workflow_dispatch:
inputs:
version:
description: 'שם הגרסה (למשל, 1.0.0)'
required: false

jobs:
build:
Expand All @@ -13,7 +17,9 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4

with:
fetch-depth: 0 # נדרש כדי לאפשר יצירת תגיות חדשות

- name: Setup Python
uses: actions/setup-python@v5
with:
Expand All @@ -27,10 +33,24 @@ jobs:
id: get_version
shell: bash
run: |
VERSION=${GITHUB_REF#refs/tags/v}
if [ "${{ github.event_name }}" == "workflow_dispatch" ] && [ -n "${{ github.event.inputs.version }}" ]; then
VERSION=${{ github.event.inputs.version }}
else
VERSION=${GITHUB_REF#refs/tags/v}
fi
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "RELEASE_TITLE=מסדר הסינגלים $VERSION" >> $GITHUB_OUTPUT
- name: Create Tag (if manually triggered)
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.version != '' }}
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
git tag v${{ steps.get_version.outputs.VERSION }}
git push origin v${{ steps.get_version.outputs.VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build EXE
run: |
flet pack -i src/core/assets/icon.ico src/core/main.py --product-name "Singles Sorter" --product-version "${{ steps.get_version.outputs.VERSION }}" --file-description "Singles Sorter" --copyright "[email protected]"
Expand Down Expand Up @@ -102,10 +122,10 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
tag_name: "v${{ steps.get_version.outputs.VERSION }}"
name: ${{ steps.get_version.outputs.RELEASE_TITLE }}
draft: true
prerelease: true
files: |
Output/Singles-Sorter-Installer-AI-${{ steps.get_version.outputs.VERSION }}.exe
Singles-Sorter-Portable-AI${{ steps.get_version.outputs.VERSION }}.zip
Singles-Sorter-Portable-AI-${{ steps.get_version.outputs.VERSION }}.zip

0 comments on commit 15e02cd

Please sign in to comment.