Skip to content

bump: version 0.2.0 → 0.2.1 #12

bump: version 0.2.0 → 0.2.1

bump: version 0.2.0 → 0.2.1 #12

Workflow file for this run

name: Release
"on":
push:
tags:
- "*"
jobs:
docker:
name: Build and push Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:${{ github.ref_name }}
pypi:
name: Build and publish package to PyPI
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
cache: pip
- name: Install Poetry
run: |
pip install poetry
- name: Build and publish package
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry build
poetry publish
release:
name: Create GitHub release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
cache: pip
- name: Install Commitizen
run: |
pip install commitizen
- name: Generate Changelog
run: |
git fetch --tags
echo Changes in this Release: | tee release_notes
cz changelog --dry-run ${{ github.ref_name }} | tail -n +2 | tee -a release_notes
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body_path: release_notes