BUMP: version 3.3.0a0 → 3.3.0a1 #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |