Merge pull request #1346 from microsoftgraph/dev #81
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: | |
- main | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
create-tag: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get SDK version and set environment variable | |
run: | | |
SDK_VERSION=$(grep 'SDK_VERSION' src/Core/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 |