generated from ydataai/opensource-template
-
Notifications
You must be signed in to change notification settings - Fork 0
164 lines (132 loc) · 5.15 KB
/
release.yml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
name: Releases
on:
release:
types:
- released
jobs:
prepare:
name: Prepare
runs-on: ubuntu-22.04
outputs:
version: ${{ steps.version.outputs.value }}
steps:
- name: Version
id: version
run: echo "value=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
build-packages:
name: Build ${{ matrix.package }} package
runs-on: ubuntu-22.04
strategy:
matrix:
package: [core, datascience]
needs:
- prepare
env:
ROOT_DIR: src/${{ matrix.package }}
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install build dependencies
run: python -m pip install --upgrade pip wheel
- name: Build
run: |
make build-${{ matrix.package }} version=${{ needs.prepare.outputs.version }} PYTHON=python
- name: Upload release assets
uses: AButler/[email protected]
with:
files: '${{ env.ROOT_DIR }}/dist/*'
repo-token: ${{ secrets.ACCESS_TOKEN }}
release-tag: ${{ needs.prepare.outputs.version }}
- name: Upload package to pypi
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: '${{ env.ROOT_DIR }}/dist/'
# update-dockerfiles:
# name: Create pull request to update dockerfiles
# runs-on: ubuntu-22.04
# needs:
# - prepare
# - build-dask
# - build-platform-common
# - build-platform-dask
# - build-platform-datasources
# - build-platform-synthesizers
# env:
# VERSION: ${{ needs.prepare.outputs.version }}
# steps:
# - name: Checkout repo
# uses: actions/checkout@v3
# with:
# repository: ydataai/dockerfiles
# token: ${{ secrets.ACCESS_TOKEN }}
# - name: Update python base requirements file
# env:
# FILE: data-science/python_ydata_base/requirements-ydata.txt
# run: |
# sed -i -r 's|\ydata-dask==.*|ydata-dask==${{ env.VERSION }}|g' ${{ env.FILE }}
# sed -i -r 's|\ydata-platform-common==.*|ydata-platform-common==${{ env.VERSION }}|g' ${{ env.FILE }}
# sed -i -r 's|\ydata-platform-dask==.*|ydata-platform-dask==${{ env.VERSION }}|g' ${{ env.FILE }}
# sed -i -r 's|\ydata-platform-datasources==.*|ydata-platform-datasources==${{ env.VERSION }}|g' ${{ env.FILE }}
# sed -i -r 's|\ydata-platform-synthesizers==.*|ydata-platform-synthesizers==${{ env.VERSION }}|g' ${{ env.FILE }}
# - name: Create Pull Request
# uses: peter-evans/create-pull-request@v3
# with:
# token: ${{ secrets.ACCESS_TOKEN }}
# branch: chore/bump-platform-python-sdk
# branch-suffix: random
# delete-branch: true
# commit-message: "chore(deps): bump platform-python-sdk to version ${{ env.VERSION }}"
# committer: "Azory <[email protected]>"
# title: "chore(deps): bump platform-python-sdk to version ${{ env.VERSION }}"
# body: https://github.com/ydataai/platform-python-sdk/releases/tag/${{ env.VERSION }}
# author: "Azory <[email protected]>"
# reviewers: portellaa
# team-reviewers: backend
# labels: ci,platform-python-sdk
# update-integration-tool:
# name: Create pull request to update integration tool
# runs-on: ubuntu-22.04
# needs:
# - prepare
# - build-dask
# - build-platform-common
# - build-platform-dask
# - build-platform-datasources
# - build-platform-synthesizers
# env:
# VERSION: ${{ needs.prepare.outputs.version }}
# steps:
# - name: Checkout repo
# uses: actions/checkout@v3
# with:
# repository: ydataai/ydata-lib-platform-integration-tool
# token: ${{ secrets.ACCESS_TOKEN }}
# - name: Update requirements file
# env:
# FILE: requirements.txt
# run: |
# sed -i -r 's|\ydata-dask==.*|ydata-dask==${{ env.VERSION }}|g' ${{ env.FILE }}
# sed -i -r 's|\ydata-platform-common==.*|ydata-platform-common==${{ env.VERSION }}|g' ${{ env.FILE }}
# sed -i -r 's|\ydata-platform-dask==.*|ydata-platform-dask==${{ env.VERSION }}|g' ${{ env.FILE }}
# sed -i -r 's|\ydata-platform-datasources==.*|ydata-platform-datasources==${{ env.VERSION }}|g' ${{ env.FILE }}
# sed -i -r 's|\ydata-platform-synthesizers==.*|ydata-platform-synthesizers==${{ env.VERSION }}|g' ${{ env.FILE }}
# - name: Create Pull Request
# uses: peter-evans/create-pull-request@v4
# with:
# token: ${{ secrets.ACCESS_TOKEN }}
# branch: chore/bump-platform-python-sdk
# branch-suffix: random
# delete-branch: true
# committer: "Azory <[email protected]>"
# commit-message: "chore(deps): bump platform-python-sdk to version ${{ env.VERSION }}"
# title: "chore(deps): bump platform-python-sdk to version ${{ env.VERSION }}"
# body: https://github.com/ydataai/platform-python-sdk/releases/tag/${{ env.VERSION }}
# author: "Azory <[email protected]>"
# reviewers: portellaa
# team-reviewers: backend
# labels: ci,platform-python-sdk