Skip to content
This repository has been archived by the owner on Feb 10, 2025. It is now read-only.

Merge pull request #477 from hugovk/archived #36

Merge pull request #477 from hugovk/archived

Merge pull request #477 from hugovk/archived #36

Workflow file for this run

name: Deploy
on:
push:
branches:
- master
release:
types:
- published
jobs:
build:
if: github.repository == 'python-twitter-tools/twitter'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
cache: pip
cache-dependency-path: setup.py
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U setuptools twine wheel
python -m pip install -r requirements.txt
- name: Build package
run: |
python setup.py --version
python setup.py sdist --format=gztar bdist_wheel
twine check dist/*
- name: Publish package to PyPI
if: github.event.action == 'published'
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/