-
Notifications
You must be signed in to change notification settings - Fork 6
49 lines (47 loc) · 1.39 KB
/
release.yml
File metadata and controls
49 lines (47 loc) · 1.39 KB
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
name: "Release"
on:
workflow_call:
inputs:
branch_client_python:
type: string
default: 'main'
required: true
previous_version:
type: string
default: ''
required: true
new_version:
type: string
default: ''
required: true
secrets:
RELEASE_TOKEN:
required: true
jobs:
release:
name: Release
runs-on: ubuntu-latest
defaults:
run:
working-directory: client-python
steps:
- name: checkout repo content
uses: actions/checkout@v4
with:
repository: OpenAEV-Platform/client-python
ref: ${{ inputs.branch_client_python }}
path: client-python
- name: setup python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
run: |
git config --global url."https://x-access-token:${GH_TOKEN}@github.com".insteadOf https://github.com
python -m pip install --upgrade pip
if [ -f scripts/requirements.txt ]; then pip install -r scripts/requirements.txt; fi
env:
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
- name: execute py script # run file
run: |
python scripts/release.py ${{ inputs.branch_client_python }} ${{ inputs.previous_version }} ${{ inputs.new_version }} ${{ secrets.RELEASE_TOKEN }}