File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 15
15
type : string
16
16
default : ' '
17
17
required : true
18
+ secrets :
19
+ RELEASE_TOKEN :
20
+ required : true
18
21
19
22
jobs :
20
23
release :
21
24
name : Release
22
25
runs-on : ubuntu-latest
26
+ defaults :
27
+ run :
28
+ working-directory : client-python
23
29
steps :
24
30
- name : checkout repo content
25
31
uses : actions/checkout@v4
32
+ with :
33
+ repository : OpenBAS-Platform/client-python
34
+ ref : ${{ inputs.branch_client_python }}
35
+ path : client-python
26
36
- name : setup python
27
37
uses : actions/setup-python@v5
28
38
with :
29
- python-version : 3.8 # install the python needed
39
+ python-version : 3.11
30
40
- name : Install dependencies
31
41
run : |
42
+ git config --global url."https://x-access-token:${GH_TOKEN}@github.com".insteadOf https://github.com
32
43
python -m pip install --upgrade pip
33
44
if [ -f scripts/requirements.txt ]; then pip install -r scripts/requirements.txt; fi
45
+ env :
46
+ GH_TOKEN : ${{ secrets.RELEASE_TOKEN }}
34
47
- name : execute py script # run file
35
48
run : |
36
- python scripts/release.py ${{ github.event. inputs.branch_client_python }} ${{ github.event. inputs.previous_version }} ${{ github.event. inputs.new_version }} ${{ github.token }}
49
+ python scripts/release.py ${{ inputs.branch_client_python }} ${{ inputs.previous_version }} ${{ inputs.new_version }} ${{ secrets.RELEASE_TOKEN }}
Original file line number Diff line number Diff line change 21
21
"github_token" , help = "The github token to use for the release note." , type = str
22
22
)
23
23
parser .add_argument (
24
- "--dev" , help = "Flag to prevent pushing the release." , action = "store_false "
24
+ "--dev" , help = "Flag to prevent pushing the release." , action = "store_true "
25
25
)
26
26
args = parser .parse_args ()
27
27
51
51
52
52
# Commit the change
53
53
logging .info ("[client-python] Pushing to " + branch_client_python )
54
- os .system ('git commit -a -m "[client] Release ' + new_version + '" > /dev/null 2>&1 ' )
54
+ os .system ('git commit -a -m "[client] Release ' + new_version + '"' )
55
55
if not args .dev :
56
- os .system ("git push origin " + branch_client_python + " > /dev/null 2>&1" )
56
+ os .system ("git push origin " + branch_client_python )
57
57
58
58
logging .info ("[client-python] Tagging" )
59
59
os .system ("git tag -f " + new_version )
You can’t perform that action at this time.
0 commit comments