File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -68,13 +68,15 @@ jobs:
68
68
# Get the current date and time
69
69
- name : Get current date and time
70
70
id : datetime
71
+ if : env.build_trigger == 'true' # Only run if build was triggered
71
72
run : |
72
73
# Save the current date and time to an environment variable
73
74
echo "current_datetime=$(date +'%d/%m/%Y %H:%M')" >> $GITHUB_ENV
74
75
75
76
# Step to get previous tag and commits
76
77
- name : Get commits since last release
77
78
id : get_commits
79
+ if : env.build_trigger == 'true' # Only run if build was triggered
78
80
shell : bash
79
81
run : |
80
82
# Get the most recent tag
93
95
# Create a release
94
96
- name : Create Release
95
97
id : create_release
96
- uses : actions/create-release@latest
97
98
if : env.build_trigger == 'true' # Execute only if build was triggered
99
+ uses : actions/create-release@latest
98
100
env :
99
101
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
100
102
with :
@@ -111,8 +113,8 @@ jobs:
111
113
# Upload the release asset
112
114
- name : Upload Release Asset
113
115
id : upload-release-asset
114
- uses : actions/upload-release-asset@v1
115
116
if : env.build_trigger == 'true' # Execute only if build was triggered
117
+ uses : actions/upload-release-asset@v1
116
118
env :
117
119
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
118
120
with :
You can’t perform that action at this time.
0 commit comments