Skip to content

Commit 73c86be

Browse files
authored
fix: fixed standard
1 parent a07a636 commit 73c86be

1 file changed

Lines changed: 31 additions & 8 deletions

File tree

.github/workflows/auto-tag.yml

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ on:
1818
required: false
1919
type: string
2020
default: "patch"
21-
release_name:
22-
description: "Formato para el nombre del release"
21+
release_name_prefix:
22+
description: "Prefijo para el nombre del release"
2323
required: false
2424
type: string
25-
default: "Release %s"
26-
release_body:
27-
description: "Formato para el cuerpo del release"
25+
default: "Release "
26+
release_body_prefix:
27+
description: "Prefijo para el cuerpo del release"
2828
required: false
2929
type: string
30-
default: "Automatic release created from commit: %s"
30+
default: "Automatic release created from commit: "
3131
secrets:
3232
token:
3333
description: "Token para crear el tag y release (normalmente GITHUB_TOKEN)"
@@ -132,14 +132,37 @@ jobs:
132132
git push origin $NEW_TAG
133133
echo "Successfully created and pushed tag $NEW_TAG"
134134
135+
- name: Prepare Release
136+
id: prepare-release
137+
run: |
138+
TAG=${{ steps.create-tag.outputs.new_tag }}
139+
COMMIT_MSG="${{ steps.get-commit-message.outputs.message }}"
140+
141+
# Prepare release name and body
142+
RELEASE_NAME="${{ inputs.release_name_prefix }}$TAG - Nombre del Proyecto"
143+
144+
# Replace placeholders in release body if they exist
145+
RELEASE_BODY="## Release $TAG
146+
147+
$COMMIT_MSG
148+
149+
### Notas de la versión
150+
Este release fue creado automáticamente por GitHub Actions para la version $TAG."
151+
152+
# Set outputs
153+
echo "release_name=$RELEASE_NAME" >> $GITHUB_OUTPUT
154+
echo "release_body<<EOF" >> $GITHUB_OUTPUT
155+
echo "$RELEASE_BODY" >> $GITHUB_OUTPUT
156+
echo "EOF" >> $GITHUB_OUTPUT
157+
135158
- name: Create GitHub Release
136159
id: create-release
137160
env:
138161
GITHUB_TOKEN: ${{ secrets.token || github.token }}
139162
uses: actions/create-release@v1
140163
with:
141164
tag_name: ${{ steps.create-tag.outputs.new_tag }}
142-
release_name: ${{ format(inputs.release_name, steps.create-tag.outputs.new_tag) }}
143-
body: ${{ format(inputs.release_body, steps.get-commit-message.outputs.message) }}
165+
release_name: ${{ steps.prepare-release.outputs.release_name }}
166+
body: ${{ steps.prepare-release.outputs.release_body }}
144167
draft: false
145168
prerelease: false

0 commit comments

Comments
 (0)