Skip to content

Bump version 0.5.5 -> 0.5.6 #40

Bump version 0.5.5 -> 0.5.6

Bump version 0.5.5 -> 0.5.6 #40

Workflow file for this run

name: Build and Release
on:
push:
tags:
- '*.*.*'
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
# Step 2: Install Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x' # Use the desired Python version
# Step 3: Install toml package to parse pyproject.toml
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install toml
# Step 4: Retrieve version from pyproject.toml
- name: Get version from pyproject.toml
id: get_version
run: |
$version = python -c "import toml; print(toml.load('pyproject.toml')['project']['version'])"
echo "Version is $version"
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Setup FFMPEG
uses: FedericoCarboni/setup-ffmpeg@v3
id: setup-ffmpeg
with:
ffmpeg-version: release
github-token: ${{ github.server_url == 'https://github.com' && github.token || '' }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
# - name: Install Inno Setup
# run: |
# curl -o C:\innosetup.exe https://jrsoftware.org/download.php/is.exe
# c:\innosetup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- /DIR="C:\InnoSetup"
# shell: powershell
#
# - name: Add Inno Setup to PATH
# run: echo "C:\InnoSetup" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
# shell: powershell
- name: Set up Inno Setup
run: |
# Download Inno Setup
Invoke-WebRequest -Uri https://jrsoftware.org/download.php/is.exe -OutFile is.exe
# Install Inno Setup
Start-Process is.exe -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-' -NoNewWindow -Wait
- name: Install dependencies
run: pip install -r requirements.txt
- name: Install pyinstaller
run: pip install pyinstaller
- name: Build executable with pyinstaller
# run: pyinstaller --onefile --windowed yaas.spec
run: pyinstaller yaas.spec
- name: Build Installer
run: |
# Run the Inno Setup script
&"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" inno_setup_script.iss
- name: Upload installer as artifact
uses: actions/upload-artifact@v2
with:
name: yaas_installer
path: D:\a\yaas\yaas\yaas_installer.exe
release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
# Step 1: Check out the repository
- name: Checkout code
uses: actions/checkout@v3
# Step 2: Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12' # Use the desired Python version
# Step 3: Install toml package to parse pyproject.toml
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install toml
# # Step 4: Retrieve version from pyproject.toml
# - name: Get version from pyproject.toml
# id: get_version
# run: |
# VERSION=$(python -c "import toml; print(toml.load('pyproject.toml')['project']['version'])")
# echo "Version is $VERSION"
# echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: yaas_installer
path: .
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: upload windows artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./yaas_installer.exe
asset_name: yaas_installer.exe
asset_content_type: application/vnd.microsoft.portable-executable
# - name: Release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: >-
# gh release create ${{ github.ref_name }}
# "yaas_installer.exe"
# --generate-notes
# --title "Version ${{ github.ref_name }}"
#