-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (71 loc) · 2.28 KB
/
deploys.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Deploys
on:
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event }}
cancel-in-progress: true
jobs:
deploy-pypi:
runs-on: ubuntu-latest
environment: Deploys
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Build and Publish Python Packages
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
python setup.py sdist
twine upload dist/*
cd setups/api/
python setup.py sdist
twine upload dist/*
cd ..
cd gui
python setup.py sdist
twine upload dist/*
cd ..
cd remote_app
python setup.py sdist
twine upload dist/*
cd ..
cd tests
python setup.py sdist
twine upload dist/*
cd ..
deploy-docker:
runs-on: ubuntu-latest
environment: Deploys
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Build and Publish Docker Images
env:
VERSION: ${{ github.event.release.tag_name }}
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login ghcr.io -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
cd ..
docker build -t ghcr.io/naruno/api:latest -f Naruno/docker/local/api/Dockerfile .
docker build -t ghcr.io/naruno/api:$VERSION -f Naruno/docker/local/api/Dockerfile .
docker build -t ghcr.io/naruno/cli:latest -f Naruno/docker/local/cli/Dockerfile .
docker build -t ghcr.io/naruno/cli:$VERSION -f Naruno/docker/local/cli/Dockerfile .
docker push ghcr.io/naruno/api:latest
docker push ghcr.io/naruno/api:$VERSION
docker push ghcr.io/naruno/cli:latest
docker push ghcr.io/naruno/cli:$VERSION