Skip to content

הוספת הרשאות #7

הוספת הרשאות

הוספת הרשאות #7

name: Build and Release ZIP from dev
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install pyinstaller
- name: Get the version
id: get_version
run: |
$version = $env:GITHUB_REF -replace 'refs/tags/', ''
echo "VERSION=$version" >> $env:GITHUB_ENV
echo "RELEASE_TITLE=Shamor Vezachor $version" >> $env:GITHUB_ENV
- name: Build EXE
run: |
flet pack main.py --product-name "Shamor Vezachor" --product-version "$VERSION" --file-description "Shamor Vezachor"
- name: Prepare ZIP package
run: |
mkdir release
mkdir release\Shamor-Vezachor
xcopy dist\* release\Shamor-Vezachor\ /s /e /q
xcopy data release\Shamor-Vezachor\data /s /e /q
xcopy LICENSE release\Shamor-Vezachor\ /q
Compress-Archive -Path release\Shamor-Vezachor\* -DestinationPath release\Shamor-Vezachor-$env:VERSION.zip -CompressionLevel Optimal
- name: Create GitHub Release
uses: softprops/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
name: ${{ env.RELEASE_TITLE }}
files: |
release/Shamor-Vezachor-${{ env.VERSION }}.zip
draft: false
prerelease: false