diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml new file mode 100644 index 0000000..5ea1969 --- /dev/null +++ b/.github/workflows/build-and-push.yml @@ -0,0 +1,47 @@ +# Copyright The FM Training Estimator Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Upload Python Package for FM Training Estimator + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: + - setup: '3.11' + tox: 'py311' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install tox + - name: Build and test with tox + run: tox -e py311 + - name: Build and check wheel package + run: + tox -e build,twinecheck + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file