File tree Expand file tree Collapse file tree 2 files changed +26
-35
lines changed
Expand file tree Collapse file tree 2 files changed +26
-35
lines changed Original file line number Diff line number Diff line change 11name : " create release"
22
33on :
4- push :
5- tags :
6- ' *'
4+ workflow_dispatch :
75
86defaults :
97 run :
108 shell : bash
119
1210jobs :
11+ create-tag :
12+ runs-on : ubuntu-latest
13+ outputs :
14+ SDK_VERSION : ${{ steps.tag-step.outputs.SDK_VERSION }}
15+ steps :
16+ - uses : actions/checkout@v3
17+
18+ - name : Get SDK version and set environment variable
19+ run : |
20+ SDK_VERSION=$(grep 'SDK_VERSION' src/GraphConstants.php | grep -oE '[0-9]+\.[0-9]+\.[0-9A-Za-z.\-]+')
21+ echo "SDK_VERSION=$SDK_VERSION" >> $GITHUB_ENV
22+
23+ - id : tag-step
24+ name : Create and publish tag
25+ run : |
26+ echo "SDK_VERSION is:"$SDK_VERSION
27+ git tag $SDK_VERSION && git push origin $SDK_VERSION
28+ echo "SDK_VERSION=$SDK_VERSION" >> "$GITHUB_OUTPUT"
29+
1330 create-release :
31+ needs : create-tag
32+ env :
33+ SDK_VERSION : ${{ needs.create-tag.outputs.SDK_VERSION }}
1434 runs-on : ubuntu-latest
1535 permissions :
1636 contents : write
2040 uses : ncipollo/release-action@v1
2141 with :
2242 generateReleaseNotes : true
23- prerelease : ${{ contains(github.ref_name , 'RC') }}
43+ prerelease : ${{ contains( env.SDK_VERSION , 'RC') }}
2444 skipIfReleaseExists : true
45+ tag : ${{ env.SDK_VERSION }}
46+ name : " Release ${{ env.SDK_VERSION }}"
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments