-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (69 loc) · 1.94 KB
/
deploy.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
84
85
86
87
name: Deploy
on:
push:
branches:
- main
jobs:
tag_release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: 'main'
- uses: actions/setup-python@v2
with:
python-version: 3.10.7
- name: Install Poetry
run: pip install poetry
- name: Bump version
run: poetry version patch
working-directory: .
- name: Set git config
run: |
git config --global user.name 'tag_release_gh_action'
git config --global user.email 'peterHoburg+tag_release_gh_action@users.noreply.github.com'
- name: Add changed file
run: git add pyproject.toml
working-directory: .
- name: Git commit
run: git commit -m "Auto update package version to $(poetry version -s)"
working-directory: .
- name: Git push
run: git push
- name: Git tag
run: git tag $(poetry version -s)
working-directory: .
- name: Push tags
run: git push origin --tags
push_to_pypi:
needs: tag_release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: 'main'
- uses: actions/setup-python@v2
with:
python-version: 3.10.7
- name: Install Poetry
run: pip install poetry py-mono-tools
- name: Configure poetry
run: poetry config pypi-token.pypi ${{ secrets.POETRY_PYPI_TOKEN_PYPI }}
- name: Build and publish package
run: pmt -n py_mono_tools deploy
docs:
needs: tag_release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: 'main'
- uses: actions/setup-python@v2
with:
python-version: 3.10.7
- run: pip install poetry
- run: poetry install --with docs
- run: poetry run mkdocs gh-deploy --force