Skip to content

Commit 3c78907

Browse files
Merge pull request #769 from microsoft/ci/main-to-v2
ci/main to v2
2 parents 6eebe0d + ca11707 commit 3c78907

File tree

8 files changed

+102
-17
lines changed

8 files changed

+102
-17
lines changed

.azure-pipelines/ci-build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ trigger:
88
include:
99
- main
1010
- support/v1
11+
- support/v2
1112
tags:
1213
include:
1314
- 'v*'
@@ -16,6 +17,7 @@ pr:
1617
include:
1718
- main
1819
- support/v1
20+
- support/v2
1921

2022
variables:
2123
buildPlatform: 'Any CPU'

.github/policies/OpenAPI.NET.OData-branch-protection.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,42 @@ configuration:
4949
# This branch pattern applies to the following branches as of 06/09/2024 20:45:44:
5050
# support/v1
5151

52+
# Specifies whether this branch can be deleted. boolean
53+
allowsDeletions: false
54+
# Specifies whether forced pushes are allowed on this branch. boolean
55+
allowsForcePushes: false
56+
# Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean
57+
dismissStaleReviews: true
58+
# Specifies whether admins can overwrite branch protection. boolean
59+
isAdminEnforced: false
60+
# Indicates whether "Require a pull request before merging" is enabled. boolean
61+
requiresPullRequestBeforeMerging: true
62+
# Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required
63+
requiredApprovingReviewsCount: 1
64+
# Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean
65+
requireCodeOwnersReview: true
66+
# Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines.
67+
requiresCommitSignatures: false
68+
# Are conversations required to be resolved before merging? boolean
69+
requiresConversationResolution: true
70+
# Are merge commits prohibited from being pushed to this branch. boolean
71+
requiresLinearHistory: false
72+
# Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
73+
requiredStatusChecks:
74+
- license/cla
75+
- Continuous Integration
76+
- CodeQL
77+
# Require branches to be up to date before merging. This should be false since the repo contains autogenerated files. boolean
78+
requiresStrictStatusChecks: false
79+
# Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
80+
restrictsPushes: false
81+
# Restrict who can dismiss pull request reviews. boolean
82+
restrictsReviewDismissals: false
83+
84+
- branchNamePattern: support/v2
85+
# This branch pattern applies to the following branches as of 06/09/2024 20:45:44:
86+
# support/v1
87+
5288
# Specifies whether this branch can be deleted. boolean
5389
allowsDeletions: false
5490
# Specifies whether forced pushes are allowed on this branch. boolean

.github/release-please.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@ primaryBranch: main
33
handleGHRelease: true
44
branches:
55
- branch: support/v1
6+
manifest: true
7+
handleGHRelease: true
8+
- branch: support/v2
69
manifest: true
710
handleGHRelease: true

.github/workflows/ci-cd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
GITHUB_RUN_NUMBER: ${{ github.run_number }}
1818
steps:
1919
- name: Setup .NET
20-
uses: actions/setup-dotnet@v4
20+
uses: actions/setup-dotnet@v5
2121
with:
2222
dotnet-version: 8.0.x
2323

@@ -44,7 +44,7 @@ jobs:
4444
4545
- name: Checkout repository
4646
id: checkout_repo
47-
uses: actions/checkout@v4
47+
uses: actions/checkout@v6
4848
with:
4949
token: ${{ secrets.GITHUB_TOKEN }}
5050
fetch-depth: 0

.github/workflows/codeql-analysis.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ main, support/v1 ]
16+
branches: [ main, support/v1, support/v2 ]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ main, support/v1 ]
19+
branches: [ main, support/v1, support/v2 ]
2020
schedule:
2121
- cron: '32 2 * * 6'
2222
workflow_dispatch:
@@ -39,16 +39,16 @@ jobs:
3939

4040
steps:
4141
- name: Checkout repository
42-
uses: actions/checkout@v4
42+
uses: actions/checkout@v6
4343

4444
- name: Setup .NET
45-
uses: actions/setup-dotnet@v4
45+
uses: actions/setup-dotnet@v5
4646
with:
4747
dotnet-version: 8.0.x
4848

4949
# Initializes the CodeQL tools for scanning.
5050
- name: Initialize CodeQL
51-
uses: github/codeql-action/init@v3
51+
uses: github/codeql-action/init@v4
5252
with:
5353
languages: ${{ matrix.language }}
5454
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -76,4 +76,4 @@ jobs:
7676
# make release
7777

7878
- name: Perform CodeQL Analysis
79-
uses: github/codeql-action/analyze@v3
79+
uses: github/codeql-action/analyze@v4
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
## -----------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See LICENSE.txt in the project root for license information.
4+
## -----------------------------------------------------------------------------
5+
#
6+
# Summary:
7+
# This GitHub Actions workflow automates the release process using Release Please.
8+
# It triggers on pushes to the main branch, generates a GitHub App token using organization
9+
# variables and secrets, and then runs the release-please-action to manage versioning and changelogs.
10+
11+
name: Release Please
12+
13+
on:
14+
push:
15+
branches:
16+
- main
17+
- support/v1
18+
- support/v2
19+
20+
permissions:
21+
contents: read
22+
23+
jobs:
24+
release-please-master:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v6
29+
30+
- name: Generate GitHub App token
31+
id: app-token
32+
uses: actions/create-github-app-token@v2
33+
with:
34+
app-id: ${{ vars.RELEASE_PLEASE_TOKEN_PROVIDER_APP_ID }}
35+
private-key: ${{ secrets.RELEASE_PLEASE_TOKEN_PROVIDER_PEM }}
36+
37+
- name: Release Please
38+
uses: googleapis/release-please-action@v4
39+
with:
40+
token: ${{ steps.app-token.outputs.token }}
41+
config-file: release-please-config.json
42+
manifest-file: .release-please-manifest.json
43+
target-branch: ${{ github.ref_name }}

.github/workflows/sonarcloud.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- main
77
- support/v1
8+
- support/v2
89
paths-ignore: ['.vscode/**']
910
pull_request:
1011
types: [opened, synchronize, reopened]
@@ -35,19 +36,19 @@ jobs:
3536
runs-on: windows-latest
3637
steps:
3738
- name: Set up JDK 17
38-
uses: actions/setup-java@v4
39+
uses: actions/setup-java@v5
3940
with:
4041
distribution: 'adopt'
4142
java-version: 17
4243
- name: Setup .NET
43-
uses: actions/setup-dotnet@v4
44+
uses: actions/setup-dotnet@v5
4445
with:
4546
dotnet-version: 8.0.x
46-
- uses: actions/checkout@v4
47+
- uses: actions/checkout@v6
4748
with:
4849
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
4950
- name: Cache SonarCloud packages
50-
uses: actions/cache@v4
51+
uses: actions/cache@v5
5152
with:
5253
path: ~/.sonar/cache
5354
key: ${{ runner.os }}-sonar

.github/workflows/validate-descriptions.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: OpenAPI Parser Validation for latest OpenAPI docs
22

33
on:
44
push:
5-
branches: [ main, support/v1 ]
5+
branches: [ main, support/v1, support/v2 ]
66
pull_request:
7-
branches: [ main, support/v1 ]
7+
branches: [ main, support/v1, support/v2 ]
88

99
jobs:
1010

@@ -13,7 +13,7 @@ jobs:
1313
outputs:
1414
matrix: ${{ steps.set-descriptions.outputs.matrix }}
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v6
1717
- id: set-descriptions
1818
run: echo "::set-output name=matrix::$(ls test/**/Resources/*.{json,yaml} | sed 's/.*\///' | jq -R -s -c 'split("\n")[:-1]')"
1919

@@ -26,11 +26,11 @@ jobs:
2626
runs-on: ubuntu-latest
2727

2828
steps:
29-
- uses: actions/checkout@v4
29+
- uses: actions/checkout@v6
3030
with:
3131
submodules: recursive
3232

3333
- name: Validate description with redocly
3434
uses: fluximus-prime/redocly-cli-github-action@v1
3535
with:
36-
args: 'lint test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/${{ matrix.descriptions }} --skip-rule operation-4xx-response --skip-rule no-server-trailing-slash --skip-rule no-unused-components --skip-rule security-defined --skip-rule info-license-url --skip-rule info-license --skip-rule no-empty-servers --skip-rule operation-summary --skip-rule tag-description --max-problems 1000'
36+
args: 'lint test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/${{ matrix.descriptions }} --max-problems 1000 --config redocly.yaml'

0 commit comments

Comments
 (0)