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 1515 type : string
1616 default : ' '
1717 required : true
18+ secrets :
19+ RELEASE_TOKEN :
20+ required : true
1821
1922jobs :
2023 release :
2124 name : Release
2225 runs-on : ubuntu-latest
26+ defaults :
27+ run :
28+ working-directory : client-python
2329 steps :
2430 - name : checkout repo content
2531 uses : actions/checkout@v4
32+ with :
33+ repository : OpenBAS-Platform/client-python
34+ ref : ${{ inputs.branch_client_python }}
35+ path : client-python
2636 - name : setup python
2737 uses : actions/setup-python@v5
2838 with :
29- python-version : 3.8 # install the python needed
39+ python-version : 3.11
3040 - name : Install dependencies
3141 run : |
42+ git config --global url."https://x-access-token:${GH_TOKEN}@github.com".insteadOf https://github.com
3243 python -m pip install --upgrade pip
3344 if [ -f scripts/requirements.txt ]; then pip install -r scripts/requirements.txt; fi
45+ env :
46+ GH_TOKEN : ${{ secrets.RELEASE_TOKEN }}
3447 - name : execute py script # run file
3548 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 2121 "github_token" , help = "The github token to use for the release note." , type = str
2222)
2323parser .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 "
2525)
2626args = parser .parse_args ()
2727
5151
5252# Commit the change
5353logging .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 + '"' )
5555if 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 )
5757
5858logging .info ("[client-python] Tagging" )
5959os .system ("git tag -f " + new_version )
You can’t perform that action at this time.
0 commit comments