@@ -2,150 +2,150 @@ name: Release Tag Creation
22description : Validates the version, bumps version files, creates and pushes a git release tag.
33
44inputs :
5- version :
6- required : true
7- description : ' Version to release (e.g. 4.1.0-beta1 or 4.0.11).'
8- dry_run :
9- required : false
10- default : ' true'
11- description : ' Dry run — validate everything but do not push commits or create tag.'
12- maintain_username :
13- required : true
14- description : ' Git user.name for the version-bump commit.'
15- maintain_email :
16- required : true
17- description : ' Git user.email for the version-bump commit.'
5+ version :
6+ required : true
7+ description : ' Version to release (e.g. 4.1.0-beta1 or 4.0.11).'
8+ dry_run :
9+ required : false
10+ default : ' true'
11+ description : ' Dry run — validate everything but do not push commits or create tag.'
12+ maintain_username :
13+ required : true
14+ description : ' Git user.name for the version-bump commit.'
15+ maintain_email :
16+ required : true
17+ description : ' Git user.email for the version-bump commit.'
1818
1919outputs :
20- channel :
21- description : ' The release channel: stable or beta.'
22- value : ${{ steps.handle-version-input.outputs.channel }}
23- checkout_branch :
24- description : ' The branch the version bump was applied to.'
25- value : ${{ steps.handle-version-input.outputs.checkout_branch }}
26- tag_pushed :
27- description : ' Whether the tag was pushed (true/false).'
28- value : ${{ steps.create-release-tag.outputs.tag_pushed }}
29- readme_stable_tag :
30- description : ' The Stable tag value written to readme.txt.'
31- value : ${{ steps.capture-readme.outputs.readme_stable_tag }}
32- readme_beta_tag :
33- description : ' The Beta tag value written to readme.txt.'
34- value : ${{ steps.capture-readme.outputs.readme_beta_tag }}
20+ channel :
21+ description : ' The release channel: stable or beta.'
22+ value : ${{ steps.handle-version-input.outputs.channel }}
23+ checkout_branch :
24+ description : ' The branch the version bump was applied to.'
25+ value : ${{ steps.handle-version-input.outputs.checkout_branch }}
26+ tag_pushed :
27+ description : ' Whether the tag was pushed (true/false).'
28+ value : ${{ steps.create-release-tag.outputs.tag_pushed }}
29+ readme_stable_tag :
30+ description : ' The Stable tag value written to readme.txt.'
31+ value : ${{ steps.capture-readme.outputs.readme_stable_tag }}
32+ readme_beta_tag :
33+ description : ' The Beta tag value written to readme.txt.'
34+ value : ${{ steps.capture-readme.outputs.readme_beta_tag }}
3535
3636runs :
37- using : composite
38- steps :
39- - name : Install dependencies
40- shell : bash
41- env :
42- ACTION_PATH : ${{ github.action_path }}
43- run : npm install --prefix "$ACTION_PATH"
37+ using : composite
38+ steps :
39+ - name : Install dependencies
40+ shell : bash
41+ env :
42+ ACTION_PATH : ${{ github.action_path }}
43+ run : npm install --prefix "$ACTION_PATH"
4444
45- - name : Handle version input
46- id : handle-version-input
47- shell : bash
48- env :
49- INPUT_VERSION : ${{ inputs.version }}
50- ACTION_PATH : ${{ github.action_path }}
51- run : node "$ACTION_PATH/main.ts"
45+ - name : Handle version input
46+ id : handle-version-input
47+ shell : bash
48+ env :
49+ INPUT_VERSION : ${{ inputs.version }}
50+ ACTION_PATH : ${{ github.action_path }}
51+ run : node "$ACTION_PATH/main.ts"
5252
53- - name : Switch to release branch
54- shell : bash
55- env :
56- CHECKOUT_BRANCH : ${{ steps.handle-version-input.outputs.checkout_branch }}
57- CHECKOUT_SHA : ${{ github.sha }}
58- run : |
59- git checkout "${CHECKOUT_BRANCH}"
60- git checkout "${CHECKOUT_SHA}" -- .github/
53+ - name : Switch to release branch
54+ shell : bash
55+ env :
56+ CHECKOUT_BRANCH : ${{ steps.handle-version-input.outputs.checkout_branch }}
57+ CHECKOUT_SHA : ${{ github.sha }}
58+ run : |
59+ git checkout "${CHECKOUT_BRANCH}"
60+ git checkout "${CHECKOUT_SHA}" -- .github/
6161
62- - name : Config git user
63- shell : bash
64- env :
65- GIT_USER_NAME : ${{ inputs.maintain_username }}
66- GIT_USER_EMAIL : ${{ inputs.maintain_email }}
67- run : |
68- git config --global user.name "${GIT_USER_NAME}"
69- git config --global user.email "${GIT_USER_EMAIL}"
62+ - name : Config git user
63+ shell : bash
64+ env :
65+ GIT_USER_NAME : ${{ inputs.maintain_username }}
66+ GIT_USER_EMAIL : ${{ inputs.maintain_email }}
67+ run : |
68+ git config --global user.name "${GIT_USER_NAME}"
69+ git config --global user.email "${GIT_USER_EMAIL}"
7070
71- - name : Update version files
72- id : capture-readme
73- shell : bash
74- env :
75- INPUT_VERSION : ${{ inputs.version }}
76- INPUT_CHANNEL : ${{ steps.handle-version-input.outputs.channel }}
77- INPUT_COMPANION_TAG : ${{ steps.handle-version-input.outputs.companion_tag }}
78- ACTION_PATH : ${{ github.action_path }}
79- run : node "$ACTION_PATH/update-version-files.ts"
71+ - name : Update version files
72+ id : capture-readme
73+ shell : bash
74+ env :
75+ INPUT_VERSION : ${{ inputs.version }}
76+ INPUT_CHANNEL : ${{ steps.handle-version-input.outputs.channel }}
77+ INPUT_COMPANION_TAG : ${{ steps.handle-version-input.outputs.companion_tag }}
78+ ACTION_PATH : ${{ github.action_path }}
79+ run : node "$ACTION_PATH/update-version-files.ts"
8080
81- - name : Commit version bump
82- shell : bash
83- env :
84- VERSION : ${{ inputs.version }}
85- DRY_RUN : ${{ inputs.dry_run }}
86- run : |
87- if [[ "${DRY_RUN}" == "true" ]]; then
88- echo "Dry run — skipping commit."
89- exit 0
90- fi
91- git add elementor.php readme.txt
92- if git diff --cached --quiet; then
93- echo "No changes to commit — version files already at ${VERSION}."
94- exit 0
95- fi
96- git commit -m "Bump version to ${VERSION}"
97- echo "Committed version bump to ${VERSION}."
81+ - name : Commit version bump
82+ shell : bash
83+ env :
84+ VERSION : ${{ inputs.version }}
85+ DRY_RUN : ${{ inputs.dry_run }}
86+ run : |
87+ if [[ "${DRY_RUN}" == "true" ]]; then
88+ echo "Dry run — skipping commit."
89+ exit 0
90+ fi
91+ git add elementor.php readme.txt
92+ if git diff --cached --quiet; then
93+ echo "No changes to commit — version files already at ${VERSION}."
94+ exit 0
95+ fi
96+ git commit -m "Bump version to ${VERSION}"
97+ echo "Committed version bump to ${VERSION}."
9898
99- - name : Create release tag
100- id : create-release-tag
101- shell : bash
102- env :
103- VERSION : ${{ inputs.version }}
104- DRY_RUN : ${{ inputs.dry_run }}
105- run : |
106- if [[ "${DRY_RUN}" == "true" ]]; then
107- echo "Dry run — skipping tag push."
108- echo "tag_pushed=false" >> "$GITHUB_OUTPUT"
109- else
110- git tag -a "${VERSION}" -m "Release version ${VERSION}"
111- git push origin "${VERSION}"
112- echo "Release tag ${VERSION} pushed successfully (branch unchanged)."
113- echo "tag_pushed=true" >> "$GITHUB_OUTPUT"
114- fi
99+ - name : Create release tag
100+ id : create-release-tag
101+ shell : bash
102+ env :
103+ VERSION : ${{ inputs.version }}
104+ DRY_RUN : ${{ inputs.dry_run }}
105+ run : |
106+ if [[ "${DRY_RUN}" == "true" ]]; then
107+ echo "Dry run — skipping tag push."
108+ echo "tag_pushed=false" >> "$GITHUB_OUTPUT"
109+ else
110+ git tag -a "${VERSION}" -m "Release version ${VERSION}"
111+ git push origin "${VERSION}"
112+ echo "Release tag ${VERSION} pushed successfully (branch unchanged)."
113+ echo "tag_pushed=true" >> "$GITHUB_OUTPUT"
114+ fi
115115
116- - name : Write job summary
117- shell : bash
118- env :
119- DRY_RUN : ${{ inputs.dry_run }}
120- TAG_PUSHED : ${{ steps.create-release-tag.outputs.tag_pushed }}
121- CHANNEL : ${{ steps.handle-version-input.outputs.channel }}
122- BRANCH : ${{ steps.handle-version-input.outputs.checkout_branch }}
123- STABLE_TAG : ${{ steps.capture-readme.outputs.readme_stable_tag }}
124- BETA_TAG : ${{ steps.capture-readme.outputs.readme_beta_tag }}
125- VERSION : ${{ inputs.version }}
126- run : |
127- if [[ "${DRY_RUN}" == "true" ]]; then
128- MODE_BADGE="🔵 Dry Run"
129- else
130- MODE_BADGE="🚀 Live"
131- fi
116+ - name : Write job summary
117+ shell : bash
118+ env :
119+ DRY_RUN : ${{ inputs.dry_run }}
120+ TAG_PUSHED : ${{ steps.create-release-tag.outputs.tag_pushed }}
121+ CHANNEL : ${{ steps.handle-version-input.outputs.channel }}
122+ BRANCH : ${{ steps.handle-version-input.outputs.checkout_branch }}
123+ STABLE_TAG : ${{ steps.capture-readme.outputs.readme_stable_tag }}
124+ BETA_TAG : ${{ steps.capture-readme.outputs.readme_beta_tag }}
125+ VERSION : ${{ inputs.version }}
126+ run : |
127+ if [[ "${DRY_RUN}" == "true" ]]; then
128+ MODE_BADGE="🔵 Dry Run"
129+ else
130+ MODE_BADGE="🚀 Live"
131+ fi
132132
133- if [[ "${TAG_PUSHED}" == "true" ]]; then
134- TAG_STATUS="✅ Pushed"
135- else
136- TAG_STATUS="⏭️ Skipped (dry run)"
137- fi
133+ if [[ "${TAG_PUSHED}" == "true" ]]; then
134+ TAG_STATUS="✅ Pushed"
135+ else
136+ TAG_STATUS="⏭️ Skipped (dry run)"
137+ fi
138138
139- {
140- echo "## Release Tag Creation Report"
141- echo ""
142- echo "| Field | Value |"
143- echo "| --- | --- |"
144- echo "| **Mode** | ${MODE_BADGE} |"
145- echo "| **Version** | \`${VERSION}\` |"
146- echo "| **Channel** | ${CHANNEL} |"
147- echo "| **Branch** | \`${BRANCH}\` |"
148- echo "| **Tag pushed** | ${TAG_STATUS} |"
149- echo "| **readme.txt stable tag** | \`${STABLE_TAG}\` |"
150- echo "| **readme.txt beta tag** | \`${BETA_TAG}\` |"
151- } >> "$GITHUB_STEP_SUMMARY"
139+ {
140+ echo "## Release Tag Creation Report"
141+ echo ""
142+ echo "| Field | Value |"
143+ echo "| --- | --- |"
144+ echo "| **Mode** | ${MODE_BADGE} |"
145+ echo "| **Version** | \`${VERSION}\` |"
146+ echo "| **Channel** | ${CHANNEL} |"
147+ echo "| **Branch** | \`${BRANCH}\` |"
148+ echo "| **Tag pushed** | ${TAG_STATUS} |"
149+ echo "| **readme.txt stable tag** | \`${STABLE_TAG}\` |"
150+ echo "| **readme.txt beta tag** | \`${BETA_TAG}\` |"
151+ } >> "$GITHUB_STEP_SUMMARY"
0 commit comments