2.12.28 #180
Workflow file for this run
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
name: Publish | |
on: | |
release: | |
types: [published] | |
jobs: | |
test: | |
uses: './.github/workflows/test.yml' | |
test-stubs: | |
uses: './.github/workflows/test-stubs.yml' | |
deploy: | |
needs: [test, test-stubs] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 | |
- name: Set up Python 3.x | |
uses: actions/setup-python@152ba7c4dd6521b8e9c93f72d362ce03bf6c4f20 # v1.2.3 | |
with: | |
python-version: '3.x' | |
- name: Install Python 3.x dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
pip3 install setuptools wheel twine | |
- name: Install metaflow | |
run: pip install . | |
- name: Generate Stubs | |
run: cd ./stubs && rm -rf metaflow-stubs/ && python -c "from metaflow.cmd.develop.stub_generator import StubGenerator; StubGenerator('./metaflow-stubs').write_out()" && cd - | |
- name: Build metaflow package | |
run: | | |
python3 setup.py sdist bdist_wheel --universal | |
- name: Build metaflow-stubs package | |
run: | | |
cd ./stubs && python3 setup.py sdist bdist_wheel --universal && cd - | |
- name: Publish metaflow-stubs package | |
uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf #v1.8.11 | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_stubs_token }} | |
packages-dir: ./stubs/dist | |
- name: Publish metaflow package | |
uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf #v1.8.11 | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_password }} |