-
Notifications
You must be signed in to change notification settings - Fork 8
79 lines (66 loc) · 1.7 KB
/
automated_release.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
name: Automated Release
on:
push:
tags:
- 'v*'
jobs:
build-and-release:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build
- name: Build wheel
run: |
python -m build --wheel
- name: Upload wheel to artifacts
uses: actions/upload-artifact@v2
with:
name: dist
path: dist/*.whl
- name: Create GitHub Release
uses: docker://antonyurchenko/git-release:v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DRAFT_RELEASE: "false"
PRE_RELEASE: "false"
CHANGELOG_FILE: "CHANGELOG.md"
with:
args: |
dist/*.whl
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Flit
run: python -m pip install flit
- name: Publish to PyPI
env:
FLIT_USERNAME: __token__
FLIT_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: flit publish --repository pypi
update-server:
name: Update on server
runs-on: ubuntu-latest
steps:
- name: executing update script on server
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SERVER_IP }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_KEY }}
script_stop: true
script: |
sudo ~/callupdate.sh