@@ -22,32 +22,21 @@ jobs:
22
22
echo "Error: There must be exactly one custom component directory." >&2
23
23
exit 1
24
24
fi
25
- DOMAIN=$(basename $(find custom_components/* -maxdepth 0 -type d))
26
- echo "::set-output name=domain::$DOMAIN"
25
+ echo "DOMAIN=$(basename $(find custom_components/* -maxdepth 0 -type d))" >> $GITHUB_ENV
27
26
28
27
- name : Install JQ
29
28
run : sudo apt-get install jq
30
29
31
30
- name : Extract version from current commit
32
31
id : current_version
33
- run : |
34
- DOMAIN=${{ steps.detect_integration.outputs.domain }}
35
- VERSION=$(jq -r '.version' custom_components/$DOMAIN/manifest.json)
36
- echo "::set-output name=version::$VERSION"
32
+ run : echo "CURRENT_VERSION=$(jq -r '.version' custom_components/$DOMAIN/manifest.json)" >> $GITHUB_ENV
37
33
38
34
- name : Extract version from previous commit
39
35
id : previous_version
40
- run : |
41
- DOMAIN=${{ steps.detect_integration.outputs.domain }}
42
- PREV_VERSION=$(git show HEAD~:custom_components/$DOMAIN/manifest.json | jq -r '.version')
43
- echo "::set-output name=version::$PREV_VERSION"
44
-
45
- - name : Check if version changed
46
- if : steps.current_version.outputs.version != steps.previous_version.outputs.version
47
- run : echo "Version changed."
36
+ run : echo "PREVIOUS_VERSION=$(git show HEAD~:custom_components/$DOMAIN/manifest.json | jq -r '.version')" >> $GITHUB_ENV
48
37
49
38
- name : Create Tag
50
- if : steps.current_version.outputs.version != steps.previous_version.outputs.version
39
+ if : ${{ env.CURRENT_VERSION != env.PREVIOUS_VERSION }}
51
40
uses : actions/github-script@v7
52
41
with :
53
42
script : |
60
49
});
61
50
62
51
- name : Create Pre-release
63
- if : steps.current_version.outputs.version != steps.previous_version.outputs.version
52
+ if : ${{ env.CURRENT_VERSION != env.PREVIOUS_VERSION }}
64
53
uses : actions/github-script@v7
65
54
with :
66
55
script : |
0 commit comments