Fix context printing (#1068) #28
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: Release | |
on: | |
push: | |
tags: | |
- "v*" | |
workflow_dispatch: | |
jobs: | |
code-quality: | |
uses: ./.github/workflows/code-quality.yaml | |
pypi-packaging: | |
name: Build and Publish llm-foundry PyPI Package | |
needs: | |
- code-quality | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.9" | |
- name: Build source and wheel distributions | |
run: | | |
if [[ "${{ github.ref }}" =~ refs\/tags\/v ]]; then | |
PYPI_PACKAGE_NAME="llm-foundry" | |
else | |
PYPI_PACKAGE_NAME="llm-foundry-test-$(date +%Y%m%d%H%M%S)" | |
fi | |
python -m pip install --upgrade build twine | |
python -m build | |
twine check --strict dist/* | |
- name: Publish 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
if: contains(github.ref, 'refs/tags/v') | |
with: | |
user: __token__ | |
password: ${{ secrets.PROD_PYPI_API_TOKEN }} | |
- name: Publish distribution 📦 to Test PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
if: contains(github.ref, 'refs/heads/') || contains(github.ref, 'refs/pull/') | |
with: | |
user: __token__ | |
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
repository_url: https://test.pypi.org/legacy/ |