Skip to content

Commit

Permalink
Automate Kiota version upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
lampajr committed May 7, 2024
1 parent 8ab3281 commit 6905cc0
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/update-kiota.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This workflow will update the Kiota generator version in the Makefile and it will
# re-generate the client opening a pull request with those changes.
name: Update Kiota generator version

on:
workflow_dispatch:
inputs:
version:
description: New Kiota version
required: true
branch:
description: Target branch to open the PR against
required: false
default: main
jobs:
update-kiota:
name: update-kiota/${{ github.event.inputs.version }}/${{ github.event.inputs.branch }}
runs-on: ubuntu-latest
env:
PYTHON_VERSION: "3.10"
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Update Kiota version
run: sed -i 's/KIOTA_VERSION ?= ".*"/KIOTA_VERSION ?= "v${{ github.event.inputs.version }}"/g' Makefile
- name: Create Pull Request
uses: gr2m/create-or-update-pull-request-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
title: Update Kiota version to ${{ github.event.inputs.version }}
body: >
Updating Kiota version to ${{ github.event.inputs.version }}.
Verify there are no breaking changes.
branch: update-kiota-version-${{ github.event.inputs.branch }}-${{ github.event.inputs.version }}
commit-message: Update kiota version to ${{ github.event.inputs.version }}

0 comments on commit 6905cc0

Please sign in to comment.