4040 name : " Publish packages"
4141 runs-on : ubuntu-latest
4242 timeout-minutes : 10
43+ outputs :
44+ release_id : ${{ steps.create_release.outputs.id }}
45+ upload_url : ${{ steps.create_release.outputs.upload_url }}
4346
4447 steps :
4548 - name : " Checkout code"
8790 path : ./artifacts/sdk-csharp-${{ inputs.version }}
8891 name : sdk-csharp-${{ inputs.version }}
8992
90- - name : " Get the artefacts 8"
91- uses : actions/download-artifact@v6
92- with :
93- path : ./artifacts/api-oas-specification-${{ inputs.version }}
94- name : api-oas-specification-${{ inputs.version }}
95-
9693 # Take out for now - might add again in the future
9794 # - name: "Get the artefacts 9"
9895 # uses: actions/download-artifact@v6
@@ -207,22 +204,6 @@ jobs:
207204 asset_name : sdk-csharp-${{ inputs.version }}.zip
208205 asset_content_type : " application/gzip"
209206
210- - name : " zip api OAS specification release asset"
211- # GitHub pages needs a single tar called artifact inside the zip.
212- working-directory : ./artifacts/api-oas-specification-${{ inputs.version }}
213- run : zip -r ../api-oas-specification-${{ inputs.version }}.zip .
214- shell : bash
215-
216- - name : " Upload api OAS specification release asset"
217- uses : actions/upload-release-asset@v1
218- env :
219- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
220- with :
221- upload_url : " ${{ steps.create_release.outputs.upload_url }}"
222- asset_path : ./artifacts/api-oas-specification-${{ inputs.version }}.zip
223- asset_name : api-oas-specification-${{ inputs.version }}.zip
224- asset_content_type : " application/gzip"
225-
226207 # Take out for now - might add again in the future
227208 # - name: "zip csharp server release asset"
228209 # # GitHub pages needs a single tar called artifact inside the zip.
@@ -241,6 +222,36 @@ jobs:
241222 # asset_name: server-csharp-${{ inputs.version }}.zip
242223 # asset_content_type: "application/gzip"
243224
225+ publish-oas-specs :
226+ name : " Publish OAS spec (${{ matrix.apimEnv }})"
227+ runs-on : ubuntu-latest
228+ needs : [publish]
229+ timeout-minutes : 10
230+ strategy :
231+ matrix :
232+ apimEnv : [internal-dev, int, ref, prod]
233+ steps :
234+ - name : " Download OAS spec artifact"
235+ uses : actions/download-artifact@v6
236+ with :
237+ path : ./artifacts/api-oas-specification-${{ matrix.apimEnv }}-${{ inputs.version }}
238+ name : api-oas-specification-${{ matrix.apimEnv }}-${{ inputs.version }}
239+
240+ - name : " Zip OAS specification"
241+ working-directory : ./artifacts/api-oas-specification-${{ matrix.apimEnv }}-${{ inputs.version }}
242+ run : zip -r ../api-oas-specification-${{ matrix.apimEnv }}-${{ inputs.version }}.zip .
243+ shell : bash
244+
245+ - name : " Upload OAS specification release asset"
246+ uses : actions/upload-release-asset@v1
247+ env :
248+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
249+ with :
250+ upload_url : ${{ needs.publish.outputs.upload_url }}
251+ asset_path : ./artifacts/api-oas-specification-${{ matrix.apimEnv }}-${{ inputs.version }}.zip
252+ asset_name : api-oas-specification-${{ matrix.apimEnv }}-${{ inputs.version }}.zip
253+ asset_content_type : " application/zip"
254+
244255 # Take out for now - might add again in the future
245256 # ### PUBLISH DOCKER - THIS NEEDS CHANGING TO DO THE DOCKER BUILD IN THE BUILD STAGE AND ARTIFACT IT. SEE publishlibhostdocker below how how and the buildlibs action.
246257 # publishdocker:
0 commit comments