@@ -21,90 +21,10 @@ jobs:
21
21
api-key : ${{ secrets.DATAMINER_DEPLOY_KEY }}
22
22
sonarCloudToken : ${{ secrets.SONAR_TOKEN }}
23
23
24
- Release :
25
- if : github.ref_type == 'tag'
26
- runs-on : ubuntu-latest
27
- needs : CI
28
- permissions :
29
- contents : write
30
- steps :
31
- - name : Checkout Code
32
- uses : actions/checkout@v4
33
-
34
- - name : Check Release
35
- id : release_check
36
- run : |
37
- REF_NAME="${{ github.ref_name }}"
38
- RELEASE_REGEX="^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$"
39
- PRE_RELEASE_REGEX="^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+-[0-9a-zA-Z]+$"
40
- if [[ $REF_NAME =~ $RELEASE_REGEX ]]
41
- then
42
- echo "prerelease=false" >> $GITHUB_OUTPUT
43
- echo "Release"
44
- exit 0
45
- elif [[ $REF_NAME =~ $PRE_RELEASE_REGEX ]]
46
- then
47
- echo "prerelease=true" >> $GITHUB_OUTPUT
48
- echo "Pre-Release"
49
- exit 0
50
- else
51
- 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."
52
- exit 1
53
- fi
54
-
55
- - name : Check Changelog
56
- id : changelog_check
57
- if : steps.release_check.outputs.prerelease == 'false'
58
- run : |
59
- FILE=./Documentation/CHANGELOG_${{ github.ref_name }}.md
60
- echo "$FILE"
61
- if [ -f "$FILE" ]
62
- then
63
- echo "changelog_exists=true" >> $GITHUB_OUTPUT
64
- echo "changelog_file=$FILE" >> $GITHUB_OUTPUT
65
- exit 0
66
- else
67
- 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."
68
- exit 1
69
- fi
70
-
71
- - name : Retrieve Installation Package
72
- id : retrieveInstallationPackage
73
- uses : actions/download-artifact@v4
74
- with :
75
- name : DataMiner Installation Package
76
- path : _DataMinerInstallationPackage
77
-
78
- - name : Find Installation Package
79
- id : findInstallationPackage
80
- run : |
81
- path=$(find _DataMinerInstallationPackage -type f -name '*.dmapp')
82
- echo $path
83
-
84
- if [ ! -z "$path" ]
85
- then
86
- newpath="${path%.*}_${{ github.ref_name }}.dmapp"
87
- echo $newpath
88
- mv $path $newpath
89
- echo "dmappPackageName=$newpath" >> $GITHUB_OUTPUT
90
- else
91
- exit 1
92
- echo "dmappPackageName=""" >> $GITHUB_OUTPUT
93
- fi
94
-
95
- - name : Logging
96
- run : |
97
- echo ${{ steps.changelog_check.outputs.changelog_exists }}
98
- echo ${{ steps.changelog_check.outputs.changelog_file }}
99
- echo ${{ steps.release_check.outputs.prerelease }}
100
- echo ${{ steps.findInstallationPackage.outputs.dmappPackageName }}
101
-
102
- - name : Create Release
103
- uses : ncipollo/release-action@v1
104
- with :
105
- name : ${{ github.ref_name }}
106
- bodyFile : ${{ steps.changelog_check.outputs.changelog_file }}
107
- draft : false
108
- prerelease : ${{ steps.release_check.outputs.prerelease == 'true' }}
109
- allowUpdates : true
110
- artifacts : ${{ steps.findInstallationPackage.outputs.dmappPackageName }}
24
+ CD :
25
+ name : CD
26
+ uses : ArneMaes0/ReusableWorkflows/Release/Release With DMAPP Artifact.yml@main
27
+ with :
28
+ referenceName : ${{ github.ref_name }}
29
+ referenceType : ${{ github.ref_type }}
30
+ changelogDirectory : Documentation
0 commit comments