Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Resolve TODO in setup.py as not applicable (#290) #30

Resolve TODO in setup.py as not applicable (#290)

Resolve TODO in setup.py as not applicable (#290) #30

Workflow file for this run

name: Release Model Card Toolkit package to PyPI and TestPyPI
on:
push:
paths:
- 'model_card_toolkit/**'
- 'setup.py'
branches:
- main
- r*
release:
types: [published]
tags:
- v*
jobs:
build-and-publish:
name: Build Model Card Toolkit package and release to PyPI and Test PyPI
runs-on: ubuntu-latest
container:
image: gcr.io/tfx-oss-public/tfx_base:py37-20200729
steps:
- uses: actions/checkout@v3
- name: Build wheel
run: |
bash -x package_build/initialize.sh; \
CFLAGS=$(/usr/bin/python-config --cflags) \
python package_build/model-card-toolkit/setup.py bdist_wheel; \
MCT_WHEEL=$(find dist -name 'model_card_toolkit-*.whl'); \
- name: Publish Model Card Toolkit distribution package to Test PyPI
uses: pypa/[email protected]
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
- name: Publish Model Card Toolkit distribution package to PyPI
if: github.event_name == 'release'
uses: pypa/[email protected]
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Upload files to a GitHub release
uses: svenstaro/[email protected]
if: github.event_name == 'release'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true