Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 32 additions & 15 deletions .azure-pipelines/ci-build-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# Please make sure to check all the converted content, it is your team's responsibility to make sure that the pipeline is still valid and functions as expected.
# This pipeline will be extended to the OneESPT template
# The pool section has been filled with placeholder values, replace the pool section with your hosted pool, os, and image name. If you are using a Linux image, you must specify an additional windows image for SDL: https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/sdlanalysis/overview#how-to-specify-a-windows-pool-for-the-sdl-source-analysis-stage
# This publishes to https://www.npmjs.com/package/@microsoft/microsoft-graph-types

name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
trigger:
branches:
Expand All @@ -10,13 +12,22 @@ trigger:
paths:
include:
- microsoft-graph.d.ts
tags:
include:
- '*'

pr: none

variables:
package_name_v1_0: 'microsoft-graph-types'

resources:
repositories:
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release

extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
Expand All @@ -29,7 +40,8 @@ extends:
stages:
- stage: build
jobs:
- job: job
- job: build_v1_0_typings
displayName: Pack v1.0 typings
templateContext:
outputs:
- output: pipelineArtifact
Expand All @@ -39,23 +51,28 @@ extends:
steps:
- checkout: self
displayName: checkout main
- task: CopyFiles@2
displayName: 'Copy Files to staging directory'

- task: UseNode@1
displayName: 'Install Node.js'
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)'
Contents: |
**/*
!spec/**
!.azure-pipelines/**
!.github/**
!.git/**
!.vscode/**
!typings-demo.gif
TargetFolder: '$(Build.ArtifactStagingDirectory)'
version: '22.x'

- script: npm ci
displayName: 'Install npm dependencies'
workingDirectory: '$(Build.SourcesDirectory)'

# Pack and stage Beta TypeScript package
- script: npm pack --pack-destination=$(Build.ArtifactStagingDirectory)
displayName: 'Generate npm package $(package_name_v1_0)'
workingDirectory: '$(Build.SourcesDirectory)'


- stage: deploy
condition: and(contains(variables['build.sourceBranch'], 'refs/heads/main'), succeeded())
displayName: 'Deploy v1.0 Typings'
# This condition deploys on successful CI runs for success builds and also allows for manual deployments from an arbitrary branch
condition: succeeded()
dependsOn:
- build
jobs:
- deployment: deploy_npm
pool:
Expand All @@ -78,7 +95,7 @@ extends:
deploy:
steps:
- task: EsrpRelease@9
displayName: 'Publish Beta NPM package via ESRP Release'
displayName: 'Publish V1.0 NPM package via ESRP Release'
inputs:
connectedservicename: "Federated DevX ESRP Managed Identity Connection"
usemanagedidentity: false
Expand Down
3 changes: 3 additions & 0 deletions .github/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
manifest: true
primaryBranch: main
handleGHRelease: true
37 changes: 37 additions & 0 deletions .github/workflows/release-please-gha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## -----------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE.txt in the project root for license information.
## -----------------------------------------------------------------------------
#
# Summary:
# This GitHub Actions workflow automates the release process using Release Please.
# It triggers on pushes to the main branch, generates a GitHub App token using organization
# variables and secrets, and then runs the release-please-action to manage versioning and changelogs.

name: Release Please

on:
push:
branches:
- main
paths:
- microsoft-graph.d.ts
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.RELEASE_PLEASE_TOKEN_PROVIDER_APP_ID }}
private-key: ${{ secrets.RELEASE_PLEASE_TOKEN_PROVIDER_PEM }}

- name: Release Please
uses: googleapis/release-please-action@v4
with:
token: ${{ steps.app-token.outputs.token }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "2.43.0"
}
7 changes: 2 additions & 5 deletions microsoft-graph.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
// Project: https://github.com/microsoftgraph/msgraph-typescript-typings
// Definitions by: Microsoft Graph Team <https://github.com/microsoftgraph>
// Michael Mainer <https://github.com/MIchaelMainer>
// Peter Ombwa <https://github.com/peombwa>
// Mustafa Zengin <https://github.com/zengin>
// DeVere Dyett <https://github.com/ddyett>
// Nikitha Udaykumar Chettiar <https://github.com/nikithauc>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Gavin Barron <https://github.com/gavinbarron>
// Adrian Obando <https://github.com/adrian05-ms>
// TypeScript Version: 2.1

export as namespace microsoftgraph;
Expand Down
11 changes: 11 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"pull-request-header": ":rocket: A new MSGraph v1.0 typings release is coming up!",
"bump-patch-for-minor-pre-major" : false,
"include-component-in-tag": false,
"packages": {
".": {
"release-type": "node"
}
}
}