Skip to content

bump project version #5

bump project version

bump project version #5

Workflow file for this run

name: publish pypi
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag_name:
description: 'Tag name to publish (e.g., v1.2.3)'
required: false
default: ''
jobs:
setup_release:
name: Create Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Determine Tag Name
id: determine_tag
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ] && [ "${{ github.event.inputs.tag_name }}" != "" ]; then
echo "TAG_NAME=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV
else
echo "TAG_NAME=${GITHUB_REF_NAME}" >> $GITHUB_ENV
fi
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create "$TAG_NAME" --generate-notes
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
needs: [setup_release]
environment:
name: pypi
url: https://pypi.org/p/axolotl-contribs-lgpl
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip3 install wheel packaging build
pip3 install -e .
- name: Build a source dist
run: |
python -m build --sdist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1