1
- name : Upload Python Package
1
+ # Copyright 2022 EPAM Systems
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # https://www.apache.org/licenses/LICENSE-2.0
7
+ #
8
+ # Unless required by applicable law or agreed to in writing, software
9
+ # distributed under the License is distributed on an "AS IS" BASIS,
10
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ # See the License for the specific language governing permissions and
12
+ # limitations under the License.
13
+
14
+ name : Release RobotFramework agent
2
15
3
16
on :
4
17
push :
5
18
branches : [ 'master' ]
6
19
paths-ignore :
7
20
- ' .github/**'
8
21
- CHANGELOG.md
9
- - README.rst
22
+ - README.md
10
23
- CONTRIBUTING.rst
11
24
12
25
env :
25
38
- name : Checkout repository
26
39
uses : actions/checkout@v3
27
40
41
+ - name : Set up Python
42
+ uses : actions/setup-python@v4
43
+ with :
44
+ python-version : ' 3.8'
45
+
46
+ - name : Install dependencies
47
+ run : python -m pip install --upgrade pip setuptools wheel
48
+
49
+ - name : Build package
50
+ run : python setup.py sdist bdist_wheel
51
+
52
+ - name : Publish package
53
+ uses : pypa/gh-action-pypi-publish@release/v1
54
+ with :
55
+ user : ${{ secrets.PYPI_USERNAME }}
56
+ password : ${{ secrets.PYPI_PASSWORD }}
57
+
28
58
- name : Generate versions
29
59
uses : HardNorth/github-version-generate@v1
30
60
with :
45
75
git tag -a ${{ env.RELEASE_VERSION }} -m "Release ${{ env.RELEASE_VERSION }}"
46
76
git push --tags
47
77
48
- - name : Set up Python
49
- uses : actions/setup-python@v4
50
- with :
51
- python-version : ' 3.6'
52
-
53
- - name : Install dependencies
54
- run : |
55
- python -m pip install --upgrade pip
56
- pip install setuptools wheel twine
57
-
58
- - name : Build and publish
59
- env :
60
- TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
61
- TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
62
- run : |
63
- python setup.py sdist bdist_wheel
64
- twine upload dist/*
65
-
66
- - name : Checkout develop branch
67
- uses : actions/checkout@v3
68
- with :
69
- ref : ' develop'
70
- fetch-depth : 0
71
-
72
78
- name : Update CHANGELOG.md
73
79
id : changelogUpdate
74
80
run : |
@@ -97,6 +103,12 @@ jobs:
97
103
name : Release ${{ env.RELEASE_VERSION }}
98
104
body : ${{ steps.readChangelogEntry.outputs.changes }}
99
105
106
+ - name : Checkout develop branch
107
+ uses : actions/checkout@v3
108
+ with :
109
+ ref : ' develop'
110
+ fetch-depth : 0
111
+
100
112
- name : Merge release branch into develop
101
113
id : mergeIntoDevelop
102
114
run : |
@@ -113,5 +125,5 @@ jobs:
113
125
rm ${{ env.VERSION_FILE }}
114
126
mv ${{ env.VERSION_FILE }}${{ env.TMP_SUFFIX }} ${{ env.VERSION_FILE }}
115
127
git add ${{ env.VERSION_FILE }}
116
- git commit -m " Version update"
128
+ git commit -m ' Version update'
117
129
git push
0 commit comments