Skip to content

Publish to TestPyPI #29

Publish to TestPyPI

Publish to TestPyPI #29

Workflow file for this run

name: Publish to TestPyPI
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install build tools
run: |
python -m pip install --upgrade pip
python -m pip install build twine
- name: Build package
working-directory: packages/markitdown # Change to the correct directory
run: |
rm -rf dist
python -m build
- name: Mask API Token
run: echo "::add-mask::$TEST_PYPI_API_TOKEN"
- name: Publish to TestPyPI
working-directory: packages/markitdown # Change to the correct directory
env:
TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
run: |
python -m twine upload --repository testpypi dist/* \
--username __token__ --password $TEST_PYPI_API_TOKEN