-
Notifications
You must be signed in to change notification settings - Fork 234
40 lines (35 loc) · 1.13 KB
/
tag.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
name: Tag new version
on:
push:
branches: [main]
paths:
- 'databricks_cli/version.py'
jobs:
tag:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.10"
- name: Check if this is a release version
id: version
env:
PYTHONPATH: /home/runner/work/databricks-cli/databricks-cli
shell: python
run: |
from databricks_cli.version import version, is_release_version
print("::set-output name=version::" + version)
if is_release_version():
print("::set-output name=is_release_version::true")
print("Release version: " + version)
else:
print("::set-output name=is_release_version::false")
print("Not a release version: " + version)
- name: Create and push tag
if: steps.version.outputs.is_release_version == 'true'
run: |
git tag ${{ steps.version.outputs.version }}
git push origin ${{ steps.version.outputs.version }}