Skip to content

Introduce refine text analysis task and service #84

Introduce refine text analysis task and service

Introduce refine text analysis task and service #84

Workflow file for this run

name: release
on:
pull_request_target:
types: [closed]
workflow_dispatch:
inputs:
releaseType:
description: 'Release type'
required: true
default: 'patch'
type: choice
options:
- patch
- minor
- major
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
release_job:
uses: bedita/github-workflows/.github/workflows/release.yml@v1
with:
main_branch: 'main'
dist_branches: '["main"]'
version_bump: ${{ inputs.releaseType }}
toml_conf_path: pyproject.toml
toml_conf_version_key: "tool.poetry.version"
publish_package:
runs-on: 'ubuntu-latest'
needs: release_job
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Debug output version
run: |
echo version var ${{ needs.release_job.outputs.version }}
- name: Print message if no semantic version was created
if: contains(needs.release_job.outputs.version, 'undefined')
run: |
echo Skip version file update and package publication
- name: Update pyproject.toml with new version
if: ${{ !contains(needs.release_job.outputs.version, 'undefined') }}
uses: colathro/[email protected]
with:
file: pyproject.toml
key: "tool.poetry.version"
value: "${{ needs.release_job.outputs.version }}"
- name: Build and publish to pypi
if: ${{ !contains(needs.release_job.outputs.version, 'undefined') }}
uses: JRubics/[email protected]
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
- name: Log in to the Container registry
if: ${{ !contains(needs.release_job.outputs.version, 'undefined') }}
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
if: ${{ !contains(needs.release_job.outputs.version, 'undefined') }}
id: push
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: |
${{ env.REGISTRY }}/${{ github.repository }}:${{ needs.release_job.outputs.version }}
${{ env.REGISTRY }}/${{ github.repository }}:latest