Skip to content

BUMP: version 3.2.7 → 3.2.8 #10

BUMP: version 3.2.7 → 3.2.8

BUMP: version 3.2.7 → 3.2.8 #10

Workflow file for this run

name: Release package to Pypi
on:
push:
tags:
- '[0-9].[0-9]+.[0-9]+**'
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: latest
virtualenvs-in-project: true
virtualenvs-create: true
- name: Install Dependencies
run: |
./scripts/install
- name: Build package
run: poetry build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Current version
id: getversion
run: |
export CURRENT_VERSION=$(poetry run cz version -p)
echo "VERSION=$CURRENT_VERSION" >> $GITHUB_OUTPUT
- name: Sleep for 30 seconds (give time to pypi to publish package)
run: sleep 40s
shell: bash
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
if: "${{ steps.getversion.outputs.VERSION != '' }}"
with:
context: .
push: true
tags: |
kpnnl/cz-kpn:${{ steps.getversion.outputs.VERSION }}