@@ -62,7 +62,9 @@ Setting up the environment can be done using one of the publish setup actions.
62
62
| ** JavaScript** | ` actions/setup-node ` |
63
63
| ** Python** | ` actions/setup-python ` |
64
64
65
- A snippet from the yaml file for a JavaScript app that uses version 10
65
+ A snippet from the yaml file for:
66
+
67
+ ** JavaScript**
66
68
67
69
``` yaml
68
70
- name : ' Login via Azure CLI'
@@ -75,11 +77,54 @@ A snippet from the yaml file for a JavaScript app that uses version 10
75
77
node-version : ' 10.x'
76
78
` ` `
77
79
80
+ **Python**
81
+
82
+ ` ` ` yaml
83
+ - name : ' Login via Azure CLI'
84
+ uses : Azure/actions/login@master
85
+ with :
86
+ creds : ${{ secrets.AZURE_CREDENTIALS }}
87
+ - name : Setup Python 3.6
88
+ uses : actions/setup-python@v1
89
+ with :
90
+ python-version : 3.6
91
+ ` ` `
92
+
93
+ **Dot Net**
94
+
95
+ ` ` ` yaml
96
+ - name : ' Login via Azure CLI'
97
+ uses : Azure/actions/login@master
98
+ with :
99
+ creds : ${{ secrets.AZURE_CREDENTIALS }}
100
+ - name : Setup Dotnet 2.2.300
101
+ uses : actions/setup-dotnet@v1
102
+ with :
103
+ dotnet-version : ' 2.2.300'
104
+ ` ` `
105
+
106
+ **Java**
107
+
108
+ ` ` ` yaml
109
+ - name : ' Login via Azure CLI'
110
+ uses : Azure/actions/login@master
111
+ with :
112
+ creds : ${{ secrets.AZURE_CREDENTIALS }}
113
+ - name : Setup Java 1.8.x
114
+ uses : actions/setup-java@v1
115
+ with :
116
+ # If your pom.xml <maven.compiler.source> version is not in 1.8.x
117
+ # Please change the Java version to match the version in pom.xml <maven.compiler.source>
118
+ java-version : ' 1.8.x'
119
+ ` ` `
120
+
78
121
## Build the function app
79
122
80
123
This depends on the language and for languages supported by Azure Functions, this section should be the standard build steps of each language.
81
124
82
- A snippet from the yaml file for a JavaScript app
125
+ A snippet from the yaml file for:
126
+
127
+ **JavaScript app**
83
128
84
129
` ` ` yaml
85
130
- name : ' Run npm'
@@ -94,7 +139,46 @@ A snippet from the yaml file for a JavaScript app
94
139
popd
95
140
` ` `
96
141
97
- This depends on the language and for languages supported by Azure Functions, this section should be the standard build steps of each language
142
+ **Python**
143
+
144
+ ` ` ` yaml
145
+ - name : ' Run pip'
146
+ shell : bash
147
+ run : |
148
+ # If your function app project is not located in your repository's root
149
+ # Please change your directory for pip in pushd
150
+ pushd .
151
+ python -m pip install --upgrade pip
152
+ pip install -r requirements.txt --target=".python_packages/lib/python3.6/site-packages"
153
+ popd
154
+ ` ` `
155
+
156
+ **Dot Net**
157
+
158
+ ` ` ` yaml
159
+ - name : ' Run dotnet build'
160
+ shell : bash
161
+ run : |
162
+ # If your function app project is not located in your repository's root
163
+ # Please consider using pushd to change your path
164
+ pushd .
165
+ dotnet build --configuration Release --output ./output
166
+ popd
167
+ ` ` `
168
+
169
+ **Java**
170
+
171
+ ` ` ` yaml
172
+ - name : ' Run mvn'
173
+ shell : bash
174
+ run : |
175
+ # If your function app project is not located in your repository's root
176
+ # Please change your directory for maven build in pushd
177
+ pushd . ./POM_ARTIFACT_ID
178
+ mvn clean package
179
+ mvn azure-functions:package
180
+ popd
181
+ ` ` `
98
182
99
183
## Deploy the function app
100
184
0 commit comments