Skip to content

Add debug code

Add debug code #12

Workflow file for this run

name: "Publish release"
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
# publish-container-image:
# name: "Publish container image to github registry"
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v3
# - name: Get version
# run: |
# VERSION="${GITHUB_REF/refs\/tags\//}"
# VERSION="${VERSION/v/}"
# echo "VERSION=${VERSION}" >> $GITHUB_ENV
# - name: Set version
# run: |
# sed -i "s|^version[\ ]*=.*|version = \"${VERSION}\"|g" pyproject.toml
# - name: Build
# run: |
# docker build . -t ${GITHUB_REPOSITORY,,}
# - name: Create tags
# run: |
# VERSIONS=(${VERSION//./ })
# TAGS=(
# "latest"
# ${VERSIONS[0]}
# ${VERSIONS[0]}.${VERSIONS[1]}
# ${VERSIONS[0]}.${VERSIONS[1]}.${VERSIONS[2]}
# )
# echo "TAGS=${TAGS[@]}" >> $GITHUB_ENV
# - name: Tagging
# run: |
# for TAG in ${TAGS}; do
# docker tag ${GITHUB_REPOSITORY,,} ghcr.io/${GITHUB_REPOSITORY,,}:${TAG}
# done
# - name: Login into registry
# run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io --username ${{ github.repository_owner }} --password-stdin
# - name: Push to image
# run: |
# for TAG in ${TAGS}; do
# docker push ghcr.io/${GITHUB_REPOSITORY,,}:${TAG}
# done
publish-python-package:
name: "Publish python package to pypi"
runs-on: ubuntu-latest
environment:
name: pypi
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Get version
run: |
VERSION="${GITHUB_REF/refs\/tags\//}"
VERSION="${VERSION/v/}"
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Set version
run: |
sed -i "s|^version[\ ]*=.*|version = \"${VERSION}\"|g" pyproject.toml
- name: Setup Python
uses: actions/[email protected]
with:
python-version: "3.12"
- name: Install Poetry Action
uses: snok/[email protected]
with:
version: '1.8.3'
- name: Build package
run: |
poetry build
# - name: pypi-publish
# uses: pypa/[email protected]
- uses: actions/upload-artifact@v4
with:
name: python-packages
path: |
dist/*.tar.gz
dist/*.whl
create-release:
name: "Create release on GitHub"
runs-on: ubuntu-latest
needs: publish-python-package
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
name: python-packages
- uses: softprops/action-gh-release@v2
with:
files: |
*.tar.gz
*.whl
generate_release_notes: true
make_latest: true