Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub Workflows for v2 SDK #1254

Merged
merged 7 commits into from
Aug 17, 2023
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
34 changes: 34 additions & 0 deletions .github/workflows/bump-generated-sdk-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

name: "Bump SDK version in generated pull request"

# Controls when the action will run. Triggers the workflow on push
# events but only for branches with the following branch spec: kiota/v1.0/pipelinebuild/*
on:
push:
branches:
- "kiota/v1.0/pipelinebuild/*"
paths:
- 'src/Generated/**'

defaults:
run:
shell: bash

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
bump-sdk-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Git config user
run: |
git config --global user.email "GraphTooling@service.microsoft.com"
git config --global user.name "Microsoft Graph DevX Tooling"
- name: Run increment script
run: php scripts/BumpPreviewSdkVersion.php

- name: Commit and push changes if any
run: if git commit -am "Bump SDK version"; then git push origin $GITHUB_REF; fi
24 changes: 24 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "create release"

on:
push:
tags:
'*'

defaults:
run:
shell: bash

jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Create Release
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
prerelease: ${{ contains(github.ref_name, 'RC') }}
skipIfReleaseExists: true
66 changes: 0 additions & 66 deletions .github/workflows/create-v1.0-pull-request.yml

This file was deleted.

9 changes: 7 additions & 2 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ on:
branches: [ main, dev, feat/kiota-preview ]
pull_request:
branches: [ main, dev, feat/kiota-preview ]
# Add assigned to defaults as a hack to easily trigger code-gen PRs to run validation
types: [assigned, opened, synchronize, reopened]

defaults:
run:
Expand All @@ -18,7 +16,14 @@ defaults:
jobs:
validate-pull-request:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.4', '8.0', '8.1', '8.2']
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- uses: actions/checkout@v3
- name: Validate composer file
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name: "tag release"
on:
push:
branches:
- main
- feat/kiota-preview

defaults:
run:
Expand Down
58 changes: 0 additions & 58 deletions .github/workflows/update-docs.yml

This file was deleted.