Skip to content

refactor: Migrate from poetry to astral uv #21

refactor: Migrate from poetry to astral uv

refactor: Migrate from poetry to astral uv #21

# Copyright 2023 The ORTHW Project 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.
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2023 Helio Chissini de Castro
name: Build and Publish
on:
workflow_run:
workflows:
- Validation
types:
- completed
workflow_dispatch:
push:
tags:
- "v*"
paths-ignore:
- "**.md"
pull_request:
paths-ignore:
- "**.md"
jobs:
build_deploy:
name: Build and Deploy Python OrtHW
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Build 📦 package
run: |
uv build
shell: bash
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: dist/*
- name: Publish Test 📦 package
if: github.event_name == 'push'
env:
UV_PUBLISH_USERNAME: ${{ secrets.TEST_PYPI_USER }}
UV_PUBLISH_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
run: |
uv publish --index testpypi dist/*