Skip to content

feat: refresh UI and stabilize resizing across screens #18

feat: refresh UI and stabilize resizing across screens

feat: refresh UI and stabilize resizing across screens #18

Workflow file for this run

name: Build and Release
on:
push:
tags:
- 'v*' # Runs when a tag like v1.0.0 is pushed
permissions:
contents: write
jobs:
build:
name: Build for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10' # Match your Python version
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ".[dev]"
- name: Update version in __init__.py
run: |
python - <<'PY'
import os
import pathlib
import re
tag_name = os.environ["GITHUB_REF"].split("/")[-1]
version = tag_name[1:] if tag_name.startswith("v") else tag_name
init_path = pathlib.Path("markitdowngui/__init__.py")
content = init_path.read_text(encoding="utf-8")
updated = re.sub(r'__version__\s*=\s*".*?"', f'__version__ = "{version}"', content)
init_path.write_text(updated, encoding="utf-8")
print(init_path.read_text(encoding="utf-8"))
PY
shell: bash
- name: Build executable
run: pyinstaller MarkItDown.spec --clean --noconfirm
shell: bash
- name: Package artifact
run: |
TAG_NAME="${GITHUB_REF#refs/tags/}"
VERSION="${TAG_NAME#v}"
ARTIFACT_NAME="MarkItDown-${{ runner.os }}-${VERSION}.zip"
mkdir dist_output
python -m zipfile -c "dist_output/${ARTIFACT_NAME}" dist/MarkItDown
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: MarkItDown-${{ runner.os }}
path: dist_output/*.zip
release:
name: Create GitHub Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download built artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: artifacts/**/*.zip
token: ${{ secrets.GITHUB_TOKEN }}