Merge pull request #107 from microsoft/bugfix/backed-model-initializa… #12
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
# This workflow publishes a distribution to PyPI when a commit is pushed to the main branch. | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Publish to PyPI | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 40 | |
steps: | |
- name: Build | |
uses: ./.github/workflows/build.yml | |
publish: | |
name: Publish distribution to PyPI | |
if: ${{ github.ref == 'refs/heads/main' }} | |
runs-on: ubuntu-latest | |
environment: pypi_prod | |
needs: [build] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install flit | |
run: | | |
pip install flit | |
- name: Publish the distibution to PyPI | |
run: flit publish | |
env: | |
FLIT_INDEX_URL: https://upload.pypi.org/legacy/ | |
FLIT_USERNAME: __token__ | |
FLIT_PASSWORD: ${{ secrets. PYPI_API_TOKEN }} |