Skip to content

chore: bump version number (#137) #27

chore: bump version number (#137)

chore: bump version number (#137) #27

# Copyright AGNTCY Contributors (https://github.com/agntcy)
# SPDX-License-Identifier: Apache-2.0
---
name: mce-release-python-package
on:
push:
tags:
- 'mce-core-v*'
workflow_dispatch: # Allow manual triggering of the workflow
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
# MCE is a pure Python package (py3-none-any), only needs one platform
build-mce-wheel:
name: Build MCE Python wheel
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Python
uses: ./.github/actions/setup-python
with:
py-install: false
poetry-install: false
uv-install: true
- name: Build wheel
working-directory: ./metrics_computation_engine
run: uv build
- name: Upload wheel
uses: actions/upload-artifact@v6
with:
name: mce-wheel
path: ./metrics_computation_engine/dist
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
needs:
- build-mce-wheel
if: |
always() &&
(needs.build-mce-wheel.result == 'skipped' || needs.build-mce-wheel.result == 'success')
environment: pypi
permissions:
# IMPORTANT: this permission is mandatory for Trusted Publishing
id-token: write
contents: read
steps:
- name: Download artifacts
uses: actions/download-artifact@v7
with:
name: mce-wheel
path: ./dist
- name: Show files
run: ls -l ./dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
packages-dir: ./dist