File tree Expand file tree Collapse file tree 2 files changed +70
-82
lines changed Expand file tree Collapse file tree 2 files changed +70
-82
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
name : CD
2
2
3
3
on :
4
+ workflow_dispatch :
4
5
push :
5
6
branches :
6
7
- main
15
16
uses : ./.github/workflows/test.yml
16
17
17
18
build :
18
- needs : [lint, test]
19
- uses : ./.github/workflows/build.yml
20
- secrets :
21
- token : ${{ secrets.PYPI_TOKEN }}
22
- repo_access : ${{ secrets.REPO_ACCESS }}
19
+ name : Build
20
+ runs-on : ubuntu-latest
21
+
22
+ needs :
23
+ - lint
24
+ - test
25
+
26
+ if : ${{ github.repository == 'UiPath/uipath-python' }}
27
+ permissions :
28
+ contents : read
29
+ actions : write
30
+
31
+ steps :
32
+ - name : Checkout
33
+ uses : actions/checkout@v4
34
+
35
+ - name : Setup uv
36
+ uses : astral-sh/setup-uv@v5
37
+ with :
38
+ enable-cache : true
39
+
40
+ - name : Setup Python
41
+ uses : actions/setup-python@v5
42
+ with :
43
+ python-version-file : " .python-version"
44
+
45
+ - name : Install dependencies
46
+ run : uv sync --all-extras
47
+
48
+ - name : Replace connection string placeholder
49
+ run : |
50
+ originalfile="src/uipath/telemetry/_constants.py"
51
+ tmpfile=$(mktemp)
52
+ trap 'rm -f "$tmpfile"' EXIT
53
+
54
+ rsync -a --no-whole-file --ignore-existing "$originalfile" "$tmpfile"
55
+ envsubst '$CONNECTION_STRING' < "$originalfile" > "$tmpfile" && mv "$tmpfile" "$originalfile"
56
+ env :
57
+ CONNECTION_STRING : ${{ secrets.APPINS_CONNECTION_STRING }}
58
+
59
+ - name : Build
60
+ run : uv build
61
+
62
+ - name : Upload artifacts
63
+ uses : actions/upload-artifact@v4
64
+ with :
65
+ name : release-dists
66
+ path : dist/
67
+
68
+ pypi-publish :
69
+ name : Upload release to PyPI
70
+ runs-on : ubuntu-latest
71
+ environment : pypi
72
+
73
+ needs :
74
+ - build
75
+ permissions :
76
+ contents : read
77
+ id-token : write
78
+
79
+ steps :
80
+ - name : Retrieve release distributions
81
+ uses : actions/download-artifact@v4
82
+ with :
83
+ name : release-dists
84
+ path : dist/
85
+
86
+ - name : Publish package distributions to PyPI
87
+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments