Skip to content

Release

Release #41

Workflow file for this run

name: Release
on:
schedule:
- cron: "0 0 1 * *"
workflow_dispatch: {}
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3 python3-pip python3-setuptools twine
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update version
run: sed -i 's/version = 0.0.0/version = $VERSION/' setup.cfg
env:
VERSION: ${{ steps.semantic.outputs.new_release_version }}
- uses: mr-smithers-excellent/docker-build-push@v6
name: Publish Docker image
if: steps.semantic.outputs.new_release_published == 'true'
with:
image: ${{ secrets.CI_REGISTRY_IMAGE }}
tags: ${{ steps.semantic.outputs.new_release_version }}, latest
registry: docker.io
dockerfile: ./Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish Pypi package
if: steps.semantic.outputs.new_release_published == 'true'
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}