-
Notifications
You must be signed in to change notification settings - Fork 18
68 lines (64 loc) · 2.07 KB
/
release_libraries.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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"