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,39 @@ 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+ permissions :
230+ id-token : write # This is required for requesting the JWT
231+ contents : read # This is required for actions/checkout
232+ timeout-minutes : 10
233+ strategy :
234+ matrix :
235+ apimEnv : [internal-dev, int, ref, prod]
236+ steps :
237+ - name : " Download OAS spec artifact"
238+ uses : actions/download-artifact@v6
239+ with :
240+ path : ./artifacts/api-oas-specification-${{ matrix.apimEnv }}-${{ inputs.version }}
241+ name : api-oas-specification-${{ matrix.apimEnv }}-${{ inputs.version }}
242+
243+ - name : " Zip OAS specification"
244+ working-directory : ./artifacts/api-oas-specification-${{ matrix.apimEnv }}-${{ inputs.version }}
245+ run : zip -r ../api-oas-specification-${{ matrix.apimEnv }}-${{ inputs.version }}.zip .
246+ shell : bash
247+
248+ - name : " Upload OAS specification release asset"
249+ uses : actions/upload-release-asset@v1
250+ env :
251+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
252+ with :
253+ upload_url : ${{ needs.publish.outputs.upload_url }}
254+ asset_path : ./artifacts/api-oas-specification-${{ matrix.apimEnv }}-${{ inputs.version }}.zip
255+ asset_name : api-oas-specification-${{ matrix.apimEnv }}-${{ inputs.version }}.zip
256+ asset_content_type : " application/zip"
257+
244258 # Take out for now - might add again in the future
245259 # ### 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.
246260 # publishdocker:
0 commit comments