Skip to content

Merge pull request #1254 from microsoftgraph/fix/gh-actions #75

Merge pull request #1254 from microsoftgraph/fix/gh-actions

Merge pull request #1254 from microsoftgraph/fix/gh-actions #75

Workflow file for this run

# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# Adds a tag to main after a PR is merged succesfully.
name: "tag release"
on:
push:
branches:
- feat/kiota-preview
defaults:
run:
shell: bash
jobs:
create-tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get SDK version and set environment variable
run: |
SDK_VERSION=$(grep 'SDK_VERSION' src/GraphConstants.php | grep -oE '[0-9]+\.[0-9]+\.([0-9]+|[0-9]+-[a-z]+)')
echo "SDK_VERSION=$SDK_VERSION" >> $GITHUB_ENV
- name: Create and publish tag
run: |
echo "SDK_VERSION is:"$SDK_VERSION
git tag $SDK_VERSION && git push origin $SDK_VERSION