You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/release.yml
+15-3Lines changed: 15 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -29,12 +29,24 @@ jobs:
29
29
uses: abatilo/actions-poetry@v2
30
30
- name: Get package name
31
31
id: package
32
-
run: echo "name=$(python -c \"with open('pyproject.toml') as f: lines = f.readlines(); for line in lines: if line.strip().startswith('name ='): print(line.strip().split(' = ')[1].strip('\\\"')); break\")" >> $GITHUB_OUTPUT
32
+
run: |
33
+
echo "name=$(python - <<'PY'
34
+
import sys
35
+
with open('pyproject.toml', 'r', encoding='utf-8') as f:
36
+
for line in f:
37
+
s = line.strip()
38
+
if s.startswith('name'):
39
+
# supports: name="foo" or name = "foo" and ignores inline comments
40
+
val = s.split('=', 1)[1].split('#', 1)[0].strip().strip('"').strip("'")
41
+
print(val)
42
+
break
43
+
PY
44
+
)" >> "$GITHUB_OUTPUT"
33
45
- name: Configure Poetry
34
46
run: |
35
-
if [ "${{ steps.package.outputs.name }}" == "polygon-api-client" ]; then
47
+
if [ "${{ steps.package.outputs.name }}" = "polygon-api-client" ]; then
0 commit comments