Skip to content

Commit 2d8e1e2

Browse files
Merge pull request #113 from microsoft/release/authentication
Mono-repo updates for release
2 parents bf199b5 + 337e014 commit 2d8e1e2

12 files changed

+106
-130
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/auto-merge-dependabot.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/create-release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: "Tag & create GitHub release"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
defaults:
9+
run:
10+
shell: bash
11+
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
create-tag:
17+
runs-on: ubuntu-latest
18+
outputs:
19+
version: ${{ steps.get-version.outputs.VERSION }}
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Get lib version and set environment variable
24+
id: get-version
25+
run: |
26+
VERSION=$(grep 'VERSION' src/Constants.php | grep -oE '[0-9]+\.[0-9]+\.([0-9]+|[0-9]+-[a-z]+)')
27+
echo "VERSION=$VERSION" >> $GITHUB_ENV
28+
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
29+
30+
- name: Create and publish tag
31+
run: |
32+
git tag $VERSION
33+
if [[ $? -ne 0 ]]; then
34+
echo "Tag $VERSION already exists. Skipping tag creation."
35+
exit 1
36+
fi
37+
git push origin $VERSION
38+
39+
create-release:
40+
needs: create-tag
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v4
44+
- name: Github Release
45+
uses: taiki-e/create-gh-release-action@v1
46+
with:
47+
token: ${{ secrets.GITHUB_TOKEN}}
48+
ref: refs/tags/${{ needs.create-tag.outputs.version }}
49+
changelog: "CHANGELOG.md"

.github/workflows/pr-validation.yml

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -27,41 +27,12 @@ jobs:
2727
coverage: none
2828
- name: Install dependencies
2929
run: composer install
30-
- name: Run static analysis
31-
run: ./vendor/bin/phpstan
32-
- name: Run tests without coverage
33-
run: ./vendor/bin/phpunit
34-
35-
code-coverage:
36-
runs-on: ubuntu-latest
37-
steps:
38-
- name: Checkout
39-
uses: actions/checkout@v4
40-
- name: Setup PHP and Xdebug for Code Coverage report
41-
uses: shivammathur/setup-php@v2
42-
with:
43-
php-version: '8.3'
44-
coverage: xdebug
45-
- name: Install dependencies
46-
run: composer install
47-
- name: Run static analysis
48-
run: ./vendor/bin/phpstan
49-
- name: Run tests with coverage
50-
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml
51-
- name: Fix code coverage paths
52-
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage.xml
53-
- name: SonarCloud Scan
54-
if: ${{ !github.event.pull_request.head.repo.fork }}
55-
uses: SonarSource/sonarcloud-github-action@master
56-
env:
57-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
5930

6031
# The check-php-version-matrix returns success if all matrix jobs in build are successful; otherwise, it returns a failure.
6132
# Use this as a PR status check for GitHub Policy Service instead of individual matrix entry checks.
6233
check-php-version-matrix:
6334
runs-on: ubuntu-latest
64-
needs: [build, code-coverage]
35+
needs: [build]
6536
if: always()
6637
steps:
6738
- name: All build matrix options are successful

.github/workflows/rerun-pr-checks.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: "Re-run checks on Release PRs"
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
defaults:
9+
run:
10+
shell: bash
11+
12+
permissions:
13+
contents: write
14+
15+
env:
16+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
PR_URL: ${{ github.event.pull_request.html_url }}
18+
19+
jobs:
20+
rerun-checks:
21+
if: ${{ github.actor == 'microsoft-graph-devx-bot[bot]' }}
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
# Kiota Abstractions needs to be released first for PR checks to pass
28+
# We delay before re-running checks to ensure Abstractions is already released
29+
# We sleep before re-running checks to ensure the status checks have time to update (https://github.com/cli/cli/pull/2279#discussion_r513610296)
30+
# Fetching checks on recently created branches can return a false "no required checks reported on the ... branch" error
31+
- name: Delay and re-run checks
32+
run: |
33+
sleep 30
34+
needsRerun=$(gh pr checks $PR_URL --required --watch --json bucket --jq '.[] | select(.bucket != "pass") | .bucket')
35+
if [[ $needsRerun ]]; then
36+
sleep 300
37+
gh pr checks $PR_URL --required --json link --jq .[].link | grep -oP '/runs/\K\d+' | { read runId; gh run rerun $runId; }
38+
fi

CHANGELOG.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased]
8+
## [1.5.0](https://github.com/microsoft/kiota-php/compare/microsoft-kiota-authentication-phpleague-v1.4.0...microsoft-kiota-authentication-phpleague-v1.5.0) (2025-02-10)
99

10-
### Added
1110

12-
### Changed
11+
### Features
12+
13+
* add release please configuration to monorepo ([57de3a2](https://github.com/microsoft/kiota-php/commit/57de3a20091d1cd349d3c4b0e840920ac3a57d75))
1314

1415
## [1.3.1] - 2024-11-27
1516

README.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,19 @@ Read more about Kiota [here](https://github.com/microsoft/kiota/blob/main/README
1515

1616
run `composer require microsoft/kiota-authentication-phpleague` or add the following to your `composer.json` file:
1717

18-
```Shell
18+
```
1919
{
2020
"require": {
21-
"microsoft/kiota-authentication-phpleague": "^1.3.1"
21+
// x-release-please-start-version
22+
"microsoft/kiota-authentication-phpleague": "^1.5.0"
23+
// x-release-please-end
2224
}
2325
}
2426
```
2527
## Contributing
2628

27-
This project welcomes contributions and suggestions. Most contributions require you to agree to a
28-
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
29-
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
30-
31-
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
32-
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
33-
provided by the bot. You will only need to do this once across all repos using our CLA.
34-
35-
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
36-
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
37-
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
29+
This project welcomes contributions and suggestions. This project welcomes contributions and suggestions. Issues and pull requests should be made against the [kiota-php](https://github.com/microsoft/kiota-php/) repository.
30+
This repository is only used for releases.
3831

3932
## Trademarks
4033

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010
}
1111
],
1212
"require": {
13-
"php": "^7.4 | ^8.0",
13+
"php": "^7.4 || ^8.0",
1414
"league/oauth2-client": "^2.6.1",
15-
"microsoft/kiota-abstractions": "^1.0.2",
15+
"microsoft/kiota-abstractions": "^1.5.0",
1616
"firebase/php-jwt": "^v6.0.0",
1717
"ramsey/uuid": "^4.2.3",
1818
"ext-openssl": "*",
1919
"ext-json": "*"
2020
},
21-
"require-dev": {
22-
"phpunit/phpunit": "^9.5.13",
23-
"phpstan/phpstan": "^1.4.6"
21+
"require-dev": {
22+
"phpunit/phpunit": "^9.6.22",
23+
"phpstan/phpstan": "^1.12.16"
2424
},
2525
"autoload": {
2626
"psr-4": {

phpstan.neon

Lines changed: 0 additions & 10 deletions
This file was deleted.

phpunit.xml

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)