Skip to content

Add workflow to build and test ml-metadata #11

Add workflow to build and test ml-metadata

Add workflow to build and test ml-metadata #11

Workflow file for this run

name: Build ml-metadata
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build ml-metadata
id: build-ml-metadata
uses: ./.github/reusable-build
with:
python-version: ${{ matrix.python-version }}
upload_to_pypi:
name: Upload to PyPI
runs-on: ubuntu-latest
if: (github.event_name == 'release' && startsWith(github.ref, 'refs/tags')) || (github.event_name == 'workflow_dispatch')
needs: [build]
environment:
name: pypi
url: https://pypi.org/p/ml-metadata/
permissions:
id-token: write
steps:
- name: Retrieve wheels
uses: actions/[email protected]
with:
merge-multiple: true
path: wheels
- name: List the build artifacts
run: |
ls -lAs wheels/
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1.9
with:
packages_dir: wheels/