-
Notifications
You must be signed in to change notification settings - Fork 130
55 lines (47 loc) · 1.69 KB
/
standardlogicapp-tag.yml
File metadata and controls
55 lines (47 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: StandardLogicApp - Tag on merge to master
on:
push:
branches: [master]
paths:
- 'Microsoft.SCIM.LogicAppValidationTemplate/StandardLogicApp/VERSION'
permissions:
contents: write
jobs:
tag:
runs-on: ubuntu-latest
steps:
- name: Checkout master
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Read VERSION and create tag
id: tag
run: |
FILE="Microsoft.SCIM.LogicAppValidationTemplate/StandardLogicApp/VERSION"
VERSION=$(tr -d '[:space:]' < "$FILE")
TAG="scim-logicapp-template-v${VERSION}"
echo "VERSION: $VERSION"
echo "TAG: $TAG"
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "tag=$TAG" >> $GITHUB_OUTPUT
if git rev-parse "$TAG" >/dev/null 2>&1; then
echo "::notice::Tag $TAG already exists. Skipping tag creation."
echo "exists=true" >> $GITHUB_OUTPUT
exit 0
fi
echo "exists=false" >> $GITHUB_OUTPUT
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git tag -a "$TAG" -m "StandardLogicApp $VERSION"
git push origin "$TAG"
echo "✅ Created and pushed tag $TAG"
- name: Create GitHub Release
if: steps.tag.outputs.exists == 'false'
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.tag.outputs.tag }}
name: StandardLogicApp v${{ steps.tag.outputs.version }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true