Skip to content

Commit f6afefa

Browse files
committed
Replaced Release actions by using
Signed-off-by: Mohamed Belgaied Hassine <belgaied2@hotmail.com>
1 parent 55f73bb commit f6afefa

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
env:
99
REGISTRY: ghcr.io
1010
IMAGE_NAME: ${{ github.repository }}
11+
TAG: ${{ github.ref_name }}
12+
ORG: ${{ github.repository_owner }}
1113

1214
jobs:
1315
build:
@@ -82,3 +84,15 @@ jobs:
8284
# files: |
8385
# out/metadata.yaml
8486
# out/infrastructure-components.yaml
87+
- name: Create GitHub Release
88+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
89+
env:
90+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91+
run: |
92+
if gh release view ${{ github.ref_name }} > /dev/null; then
93+
echo ${{ github.ref_name }} release exists
94+
else
95+
gh release create ${{ github.ref_name }} --draft --notes "Draft release for ${{ github.ref_name }}"
96+
fi
97+
gh release upload ${{ github.ref_name }} out/metadata.yaml
98+
gh release upload ${{ github.ref_name }} out/infrastructure-components.yaml

0 commit comments

Comments
 (0)