Skip to content

feat: move endpoints services to openapi gateway #7

feat: move endpoints services to openapi gateway

feat: move endpoints services to openapi gateway #7

Workflow file for this run

name: Release Package
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Get branch name
id: branch
run: |
# Get the branch that contains this tag
BRANCH=$(git branch -r --contains ${{ github.ref }} | grep -v HEAD | head -1 | sed 's/.*\///')
echo "branch=$BRANCH" >> $GITHUB_OUTPUT
echo "Detected branch: $BRANCH"
- name: Build and publish to PyPI (main branch)
if: steps.branch.outputs.branch == 'main'
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
echo "🚀 Publishing to PyPI (production)"
make release
- name: Build and publish to Test PyPI (other branches)
if: steps.branch.outputs.branch != 'main'
env:
TEST_PYPI_TOKEN: ${{ secrets.TEST_PYPI_TOKEN }}
run: |
echo "🧪 Publishing to Test PyPI (branch: ${{ steps.branch.outputs.branch }})"
make release-test