Skip to content

Commit 413879e

Browse files
authored
Merge pull request #150 from microsoft/feat/publish-pipeline
refactor: add tag control to publish pipeline
2 parents fe18e17 + 53fc25a commit 413879e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/publish-template.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ on:
1313
description: "release type(alpha, rc, stable)"
1414
required: true
1515
default: "alpha"
16+
add-tag:
17+
description: "add tag to the release"
18+
required: true
19+
default: "false"
1620

1721
permissions:
1822
contents: read
@@ -27,6 +31,12 @@ jobs:
2731
echo "Invalid release type '${{ github.event.inputs.release-type }}' provided. Valid values are 'alpha', 'rc', 'stable'."
2832
exit 1
2933
34+
- name: Validate add tag
35+
if: ${{ github.event.inputs.add-tag != 'false' && github.event.inputs.add-tag != 'true' }}
36+
run: |
37+
echo "Invalid add tag '${{ github.event.inputs.add-tag }}' provided. Valid values are 'true', 'false'."
38+
exit 1
39+
3040
- name: Checkout branch
3141
uses: actions/checkout@v4
3242
with:
@@ -54,3 +64,10 @@ jobs:
5464
with:
5565
name: ${{ env.TEMPLATE_NAME }}
5666
path: template.zip
67+
68+
- name: Release template ZIP file To GitHub Release
69+
uses: softprops/action-gh-release@v2
70+
if: ${{ github.event.inputs.add-tag == 'true' }}
71+
with:
72+
tag_name: ${{ env.TIMESTAMP }}-${{ inputs.publish-branch }}-${{ inputs.release-type }}
73+
files: template.zip

0 commit comments

Comments
 (0)