diff --git a/eng/pipelines/templates/stages/archetype-java-release.yml b/eng/pipelines/templates/stages/archetype-java-release.yml index 94bf10c1da98..406369c7480c 100644 --- a/eng/pipelines/templates/stages/archetype-java-release.yml +++ b/eng/pipelines/templates/stages/archetype-java-release.yml @@ -118,6 +118,12 @@ stages: PackageName: ${{artifact.name}} ServiceName: ${{parameters.ServiceDirectory}} ForRelease: true + # Verify both TypeSpec and swagger specification are from the main branch of Azure/azure-rest-api-specs repo. + - template: /eng/common/pipelines/templates/steps/verify-restapi-spec-location.yml + parameters: + PackageName: ${{artifact.name}} + ServiceDirectory: ${{parameters.ServiceDirectory}} + ArtifactLocation: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed/${{artifact.groupId}} # Only check compilation if this isn't an uber JAR release. # Uber JARs are self-contained and a compilation failure during creating it would have prevented its creation.