7
7
- ' [0-9]+.[0-9]+.[0-9]+.[0-9]+-[0-9a-zA-Z]+'
8
8
workflow_dispatch :
9
9
jobs :
10
- CI :
11
- name : CI
12
- uses : SkylineCommunications/_ReusableWorkflows/.github/workflows/Automation Master Workflow.yml@main
13
- with :
14
- referenceName : ${{ github.ref_name }}
15
- runNumber : ${{ github.run_number }}
16
- referenceType : ${{ github.ref_type }}
17
- repository : ${{ github.repository }}
18
- owner : ${{ github.repository_owner }}
19
- sonarCloudProjectName : qsdqsd
20
- secrets :
21
- api-key : ${{ secrets.DATAMINER_DEPLOY_KEY }}
22
- sonarCloudToken : ${{ secrets.SONAR_TOKEN }}
10
+ # CI:
11
+ # name: CI
12
+ # uses: SkylineCommunications/_ReusableWorkflows/.github/workflows/Automation Master Workflow.yml@main
13
+ # with:
14
+ # referenceName: ${{ github.ref_name }}
15
+ # runNumber: ${{ github.run_number }}
16
+ # referenceType: ${{ github.ref_type }}
17
+ # repository: ${{ github.repository }}
18
+ # owner: ${{ github.repository_owner }}
19
+ # sonarCloudProjectName: qsdqsd
20
+ # secrets:
21
+ # api-key: ${{ secrets.DATAMINER_DEPLOY_KEY }}
22
+ # sonarCloudToken: ${{ secrets.SONAR_TOKEN }}
23
23
24
24
Release :
25
25
# if: github.ref_type == 'tag'
@@ -44,18 +44,37 @@ jobs:
44
44
exit 1
45
45
fi
46
46
47
+ - name : Check Release
48
+ id : release_check
49
+ run : |
50
+ REF_NAME="${{ secrets.REF_NAME }}""
51
+ RELEASE_REGEX="^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$"
52
+ PRE_RELEASE_REGEX="^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+-[0-9a-zA-Z]+$"
53
+ if [[ $REF_NAME =~ $RELEASE_REGEX ]]
54
+ then
55
+ echo "prerelease=false" >> $GITHUB_OUTPUT
56
+ exit 0
57
+ elif [[ $REF_NAME =~ $PRE_RELEASE_REGEX ]]
58
+ then
59
+ echo "prerelease=true" >> $GITHUB_OUTPUT
60
+ exit 0
61
+ else
62
+ exit 1
63
+ fi
64
+
47
65
- name : Logging
48
66
run : |
49
67
echo ${{ steps.changelog_check.outputs.changelog_exists }}
50
68
echo ${{ steps.changelog_check.outputs.changelog_file }}
69
+ echo ${{ steps.release_check.outputs.prerelease }}
51
70
52
- # - name: Create Release
53
- # uses: actions/create-release@v1
54
- # env:
55
- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56
- # with:
57
- # tag_name: ${{ github.ref }}
58
- # release_name: ${{ github.ref }}
59
- # body_path: ${{ steps.changelog_check.outputs.changelog_file }}
60
- # draft: false
61
- # prerelease: false
71
+ - name : Create Release
72
+ uses : actions/create-release@v1
73
+ env :
74
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
75
+ with :
76
+ tag_name : ${{ github.ref }}
77
+ release_name : ${{ github.ref }}
78
+ body_path : ${{ steps.changelog_check.outputs.changelog_file }}
79
+ draft : false
80
+ prerelease : ${{ steps.release_check.outputs.prerelease == 'true' }}
0 commit comments