File tree Expand file tree Collapse file tree 3 files changed +52
-1
lines changed Expand file tree Collapse file tree 3 files changed +52
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : MLGO Packaging CI
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ schedule :
6
+ - cron : ' 0 0 * * *'
7
+
8
+ jobs :
9
+ BuildAndPublich :
10
+ runs-on : ubuntu-latest
11
+ name : Build and Publish Package
12
+ steps :
13
+ - uses : actions/checkout@v3
14
+ name : Checkout repository
15
+ - uses : actions/setup-python@v4
16
+ name : Setup Python
17
+ with :
18
+ python-version : ' 3.10'
19
+ cache : ' pip'
20
+ - run : pip3 install build==0.1.0 setuptools==67.8.0 twine==4.0.2
21
+ name : Install Packaging Dependencies
22
+ # TODO(boomanaiden154): Switch this install step over to using pipenv
23
+ # once regenerating the lockfile has been fixed.
24
+ - run : python3 -m build
25
+ name : Build package
26
+ - run : twine upload dist/*
27
+ env :
28
+ TWINE_USERNAME : __token__
29
+ TWINE_PASSWORD : ${{secrets.PYPI_TOKEN}}
30
+ name : Publish the package
Original file line number Diff line number Diff line change
1
+ # coding=utf-8
2
+ # Copyright 2020 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ """Setup version information for the package."""
16
+
17
+ from datetime import timezone , datetime
18
+
19
+ __version__ = '0.0.1.dev' + datetime .now (tz = timezone .utc ).strftime ('%Y%m%d%H%M' )
Original file line number Diff line number Diff line change @@ -15,8 +15,10 @@ dependencies = [
15
15
" tensorflow>=2.12.0" ,
16
16
" dm-reverb>=0.11.0"
17
17
]
18
- version = " 0.0.1 "
18
+ dynamic = [ " version " ]
19
19
20
20
[tool .setuptools .packages .find ]
21
21
include = [" compiler_opt*" ]
22
22
23
+ [tool .setuptools .dynamic ]
24
+ version = {attr = " compiler_opt.package_config.__version__" }
You can’t perform that action at this time.
0 commit comments