Merge pull request #104 from imotai/main #39
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: Relase CLI | |
on: | |
push: | |
tags: | |
- "[v]?[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
pypi-publish: | |
name: Release the library to PYPI | |
#runs-on: self-hosted | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: build packages | |
run: | | |
TAG=${GITHUB_REF/refs\/tags\//} | |
VERSION=${TAG#*v} | |
bash build_package.sh ${VERSION} | |
- name: Publish Proto | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: proto/dist | |
password: ${{ secrets.PYPI_TOKEN }} | |
- name: Publish Kernel | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: kernel/dist | |
password: ${{ secrets.PYPI_TOKEN }} | |
- name: Publish Agent | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: agent/dist | |
password: ${{ secrets.PYPI_TOKEN }} | |
- name: Publish Chat | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: chat/dist | |
password: ${{ secrets.PYPI_TOKEN }} | |
- name: Publish Up | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: up/dist | |
password: ${{ secrets.PYPI_TOKEN }} | |
- name: Publish SDK | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: sdk/dist | |
password: ${{ secrets.PYPI_TOKEN }} | |
- name: docker login | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build Docker image | |
run: | | |
ROOT_DIR=`pwd` | |
RELEASE_NAME=${GITHUB_REF/refs\/tags\//} | |
cd ${ROOT_DIR}/docker && docker build -f Dockerfile --no-cache -t dbpunk/octogen:${RELEASE_NAME} . | |
docker push dbpunk/octogen:${RELEASE_NAME} | |
echo "the new images version $RELEASE_NAME" |