@@ -29,98 +29,20 @@ jobs:
29
29
api-key : ${{ secrets.DATAMINER_DEPLOY_KEY }}
30
30
sonarCloudToken : ${{ secrets.SONAR_TOKEN }}
31
31
32
- Release :
32
+ CD :
33
+ uses : ArneMaes0/ReusableWorkflows/.github/workflows/Release With DMAPP Artifact.yml@main
33
34
if : github.ref_type == 'tag'
34
- runs-on : ubuntu-latest
35
35
needs : CI
36
- permissions :
36
+ permissions :
37
37
contents : write
38
- steps :
39
- - name : Checkout Code
40
- uses : actions/checkout@v4
41
-
42
- - name : Check Release
43
- id : release_check
44
- run : |
45
- REF_NAME="${{ github.ref_name }}"
46
- RELEASE_REGEX="^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$"
47
- PRE_RELEASE_REGEX="^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+-[0-9a-zA-Z]+$"
48
- if [[ $REF_NAME =~ $RELEASE_REGEX ]]
49
- then
50
- echo "prerelease=false" >> $GITHUB_OUTPUT
51
- echo "Release"
52
- exit 0
53
- elif [[ $REF_NAME =~ $PRE_RELEASE_REGEX ]]
54
- then
55
- echo "prerelease=true" >> $GITHUB_OUTPUT
56
- echo "Pre-Release"
57
- exit 0
58
- else
59
- echo "Tag is in the incorrect format. Should be 0.0.0.0 for a release or 0.0.0.0-someprereleasetag for a pre-release."
60
- exit 1
61
- fi
62
-
63
- - name : Check Changelog
64
- id : changelog_check
65
- if : steps.release_check.outputs.prerelease == 'false'
66
- run : |
67
- FILE=./Documentation/CHANGELOG_${{ github.ref_name }}.md
68
- echo "$FILE"
69
- if [ -f "$FILE" ]
70
- then
71
- echo "changelog_exists=true" >> $GITHUB_OUTPUT
72
- echo "changelog_file=$FILE" >> $GITHUB_OUTPUT
73
- exit 0
74
- else
75
- echo "There is no changelog found for tag $FILE. Please add a CHANGELOG_$FILE.md file with the changes for this version in the Documentation folder."
76
- exit 1
77
- fi
78
-
79
- - name : Retrieve Installation Package
80
- id : retrieveInstallationPackage
81
- uses : actions/download-artifact@v4
82
- with :
83
- name : DataMiner Installation Package
84
- path : _DataMinerInstallationPackage
85
-
86
- - name : Find Installation Package
87
- id : findInstallationPackage
88
- run : |
89
- path=$(find _DataMinerInstallationPackage -type f -name '*.dmapp')
90
- echo $path
91
-
92
- if [ ! -z "$path" ]
93
- then
94
- newpath="${path%.*}_${{ github.ref_name }}.dmapp"
95
- echo $newpath
96
- mv $path $newpath
97
- echo "dmappPackageName=$newpath" >> $GITHUB_OUTPUT
98
- else
99
- exit 1
100
- echo "dmappPackageName=""" >> $GITHUB_OUTPUT
101
- fi
102
-
103
- - name : Logging
104
- run : |
105
- echo ${{ steps.changelog_check.outputs.changelog_exists }}
106
- echo ${{ steps.changelog_check.outputs.changelog_file }}
107
- echo ${{ steps.release_check.outputs.prerelease }}
108
- echo ${{ steps.findInstallationPackage.outputs.dmappPackageName }}
109
-
110
- - name : Create Release
111
- uses : ncipollo/release-action@v1
112
- with :
113
- name : ${{ github.ref_name }}
114
- bodyFile : ${{ steps.changelog_check.outputs.changelog_file }}
115
- draft : false
116
- prerelease : ${{ steps.release_check.outputs.prerelease == 'true' }}
117
- allowUpdates : true
118
- artifacts : ${{ steps.findInstallationPackage.outputs.dmappPackageName }}
38
+ with :
39
+ referenceName : ${{ github.ref_name }}
40
+ referenceType : ${{ github.ref_type }}
41
+ changelogDirectory : Documentation
119
42
120
43
# # Optional 0 or More CD Jobs as needed
121
44
# CD:
122
45
# if: github.ref_type == 'tag'
123
- # environment: production
124
46
# name: CD
125
47
# runs-on: ubuntu-latest
126
48
# needs: CI
0 commit comments