Skip to content

Bump version 0.5.8 -> 0.5.9 #43

Bump version 0.5.8 -> 0.5.9

Bump version 0.5.8 -> 0.5.9 #43

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
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@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: 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 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
# - name: Start Border0 in case of failure.
# # if: failure()
# uses: borderzero/gh-action@v2
# with:
# token: ${{ secrets.BORDER0_ADMIN_TOKEN }}
# # slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
# wait-for: 20‍
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 }}"
#