Skip to content

chore: do not publish when there is no release cut #44

chore: do not publish when there is no release cut

chore: do not publish when there is no release cut #44

Workflow file for this run

name: Release & Publish
on:
push:
branches:
- main
jobs:
Release-And-Publish:
runs-on: ubuntu-latest
concurrency: release
permissions:
contents: write
id-token: write
steps:
- name: 📥 checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 🔧 setup uv
uses: ./.github/uv
- name: 📜 semantic release version
run: |
RET_CODE=0
uv run semantic-release --strict version || RET_CODE=$?
if [ $RET_CODE -ne 0 ]; then
echo "Nothing to publish"
exit 0
fi
env:
GH_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
- name: 🛠️ uv build
run: |
uv build
- name: 📰 publish on pypi
run: uv run twine upload dist/*
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}