File tree Expand file tree Collapse file tree 5 files changed +70
-5
lines changed
backends/azure_tf_backend
generic_terraform_service/src Expand file tree Collapse file tree 5 files changed +70
-5
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ jobs :
9+ Release :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Wait for lint and tests to succeed
13+ uses : lewagon/wait-on-check-action@v0.2
14+ with :
15+ ref : ${{ github.ref }}
16+ check-name : ' LintAndTest'
17+ repo-token : ${{ secrets.GITHUB_TOKEN }}
18+ wait-interval : 10
19+ - name : Checkout Code
20+ uses : actions/checkout@v2
21+
22+ - name : Validate tag version
23+ run : |
24+ version=$(cat package/version.txt) # get cloudshell-iac-terraform version
25+ tag=${GITHUB_REF/refs\/tags\//} # get tag name
26+ tag="${tag:1}" # remove the 'v' prefix from the tag that triggered this action
27+ echo $version
28+ echo $tag
29+ if [ "$tag" == "$version" ]
30+ then
31+ echo "Tag and version are equal"
32+ else
33+ echo "Error: Tag and version are not equal, cannot create a release"
34+ exit 1
35+ fi
36+
37+ - name : Set up Python
38+ uses : actions/setup-python@v2
39+ with :
40+ python-version : ' 3.7'
41+
42+ - name : Install Dependencies
43+ run : |
44+ python -m pip install --upgrade pip
45+ if [ -f package/requirements.txt ]; then pip install -r package/requirements.txt; fi
46+ pip install setuptools wheel twine
47+
48+ - name : Build
49+ run : |
50+ cd package
51+ python setup.py sdist bdist_wheel
52+
53+ - name : Create Release and Upload Artifacts
54+ uses : softprops/action-gh-release@v1
55+ with :
56+ files : dist/*
57+ env :
58+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
59+
60+ - name : Publish to Pypi
61+ env :
62+ TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
63+ TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
64+ run : |
65+ twine upload dist/*
Original file line number Diff line number Diff line change 2424 include_package_data = True ,
2525 keywords = "sandbox cloud IaC cloudshell terraform" ,
2626 classifiers = [
27- "Development Status :: 4 - Beta " ,
27+ "Development Status :: 5 - Production/Stable " ,
2828 "Topic :: Software Development :: Libraries" ,
2929 "License :: OSI Approved :: Apache Software License" ,
3030 ],
Original file line number Diff line number Diff line change 1- 0.1 .0
1+ 1.0 .0
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
33metadata :
44 template_name : Azure Tf Backend
55 template_author : Anonymous
6- template_version : 0.1 .0
6+ template_version : 1.0 .0
77 template_icon : shell-icon.png
88
99description : >
Original file line number Diff line number Diff line change 1- cloudshell-iac-terraform == 0.1 .0
2- cloudshell-shell-core == 5.0.5
1+ cloudshell-iac-terraform == 1.0 .0
2+ cloudshell-shell-core == 5.0.5
You can’t perform that action at this time.
0 commit comments