File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8080
8181 - name : Publish package
8282 run : uv publish
83+
84+ release :
85+ name : Create GitHub release
86+ needs : build
87+ runs-on : ubuntu-latest
88+ permissions :
89+ contents : write
90+
91+ steps :
92+ - uses : actions/checkout@v6
93+
94+ - name : Get version
95+ id : version
96+ run : |
97+ VERSION=$(grep '^__version__' packages/uipath_langchain_client/src/uipath_langchain_client/__version__.py | sed -n 's/.*"\([^"]*\)".*/\1/p')
98+ echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
99+
100+ - name : Extract changelog section
101+ run : |
102+ python3 -c "
103+ import re
104+ version = '''${{ steps.version.outputs.version }}'''
105+ with open('packages/uipath_langchain_client/CHANGELOG.md') as f:
106+ content = f.read()
107+ pattern = r'(## \[' + re.escape(version) + r'\][^\n]*\n)(.*?)(?=\n## \[|\Z)'
108+ match = re.search(pattern, content, re.DOTALL)
109+ notes = match.group(0).strip() if match else ('Release ' + version)
110+ with open('release_notes.md', 'w') as f:
111+ f.write(notes)
112+ "
113+
114+ - name : Create GitHub release
115+ uses : softprops/action-gh-release@v2
116+ with :
117+ tag_name : langchain-v${{ steps.version.outputs.version }}
118+ name : langchain-v${{ steps.version.outputs.version }}
119+ body_path : release_notes.md
120+ skip_if_tag_exists : true
121+ env :
122+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
83123
Original file line number Diff line number Diff line change 4949
5050 - name : Publish package
5151 run : uv publish
52+
53+ release :
54+ name : Create GitHub release
55+ needs : build
56+ runs-on : ubuntu-latest
57+ permissions :
58+ contents : write
59+
60+ steps :
61+ - uses : actions/checkout@v6
62+
63+ - name : Get version
64+ id : version
65+ run : |
66+ VERSION=$(grep '^__version__' src/uipath_llm_client/__version__.py | sed -n 's/.*"\([^"]*\)".*/\1/p')
67+ echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
68+
69+ - name : Extract changelog section
70+ run : |
71+ python3 -c "
72+ import re
73+ version = '''${{ steps.version.outputs.version }}'''
74+ with open('CHANGELOG.md') as f:
75+ content = f.read()
76+ pattern = r'(## \[' + re.escape(version) + r'\][^\n]*\n)(.*?)(?=\n## \[|\Z)'
77+ match = re.search(pattern, content, re.DOTALL)
78+ notes = match.group(0).strip() if match else ('Release ' + version)
79+ with open('release_notes.md', 'w') as f:
80+ f.write(notes)
81+ "
82+
83+ - name : Create GitHub release
84+ uses : softprops/action-gh-release@v2
85+ with :
86+ tag_name : v${{ steps.version.outputs.version }}
87+ name : v${{ steps.version.outputs.version }}
88+ body_path : release_notes.md
89+ skip_if_tag_exists : true
90+ env :
91+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5292
Original file line number Diff line number Diff line change 44 pull_request :
55 branches :
66 - main
7+ paths :
8+ - " src/**"
9+ - " packages/**"
10+ - " tests/**"
11+ - " pyproject.toml"
12+ - " uv.lock"
13+ - " .python-version"
714
815jobs :
916 type_check :
You can’t perform that action at this time.
0 commit comments