File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Tag new version
2+
3+ on :
4+ push :
5+ branches : [master]
6+ paths :
7+ - ' databricks_cli/version.py'
8+
9+ jobs :
10+ tag :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v2
15+
16+ - name : Set up Python
17+ uses : actions/setup-python@v1
18+ with :
19+ python-version : " 3.10"
20+
21+ - name : Check if this is a release version
22+ id : version
23+ env :
24+ PYTHONPATH : /home/runner/work/databricks-cli/databricks-cli
25+ shell : python
26+ run : |
27+ from databricks_cli.version import version, is_release_version
28+ print("::set-output name=version::" + version)
29+ if is_release_version():
30+ print("::set-output name=is_release_version::true")
31+ print("Release version: " + version)
32+ else:
33+ print("::set-output name=is_release_version::false")
34+ print("Not a release version: " + version)
35+
36+ - name : Create and push tag
37+ if : steps.version.outputs.is_release_version == 'true'
38+ run : |
39+ git tag ${{ steps.version.outputs.version }}
40+ git push origin ${{ steps.version.outputs.version }}
You can’t perform that action at this time.
0 commit comments