-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (34 loc) · 1.04 KB
/
publish.yml
File metadata and controls
42 lines (34 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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