[pytx] More twiddling of pytx release (#1713) #43
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) Meta Platforms, Inc. and affiliates. | |
name: Publish threatexchange to pypi | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "python-threatexchange/version.txt" | |
defaults: | |
run: | |
working-directory: python-threatexchange | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: "3.13" | |
- name: Install packaging dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools | |
pip install -e ".[package]" | |
- name: Package threatexchange | |
run: | | |
python ./setup.py sdist bdist_wheel | |
- name: Publish distribution to Test PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.test_pypi_password }} | |
repository_url: https://test.pypi.org/legacy/ | |
packages_dir: python-threatexchange/dist | |
- name: Publish distribution to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.pypi_password }} | |
packages_dir: python-threatexchange/dist |