Skip to content

2.19.21

2.19.21 #289

Workflow file for this run

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-22.04
# Specifying a GitHub environment is optional, but strongly encouraged
environment: pypi
permissions:
# IMPORTANT: this permission is mandatory for Trusted Publishing
id-token: write
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Set up Python 3.x
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.x'
- name: Install Python 3.x dependencies
run: |
python3 -m pip install --upgrade pip
pip3 install --upgrade setuptools wheel twine pkginfo
- 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@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e #v1.13.0
with:
packages-dir: ./stubs/dist
- name: Publish metaflow package
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e #v1.13.0