Compare commits

..

23 commits
v2.0.0 ... main

Author SHA1 Message Date
Kristina
f209927867 con token 4
All checks were successful
Build and Release / build-and-release (push) Successful in 7s
2026-05-16 17:39:54 +02:00
Kristina
7e1e41c789 con token 3 2026-05-16 17:37:37 +02:00
Kristina
43c152ac0b con caracteristica
All checks were successful
Build and Release / build-and-release (push) Successful in 8s
2026-05-16 17:32:40 +02:00
Kristina
b1d1465156 con token
All checks were successful
Build and Release / build-and-release (push) Successful in 6s
2026-05-16 17:05:42 +02:00
Kristina
eb71eb8d4d con token 2
All checks were successful
Build and Release / build-and-release (push) Successful in 7s
2026-05-16 17:02:49 +02:00
Kristina
532f8cb2b7 con token
All checks were successful
Build and Release / build-and-release (push) Successful in 11s
2026-05-16 16:58:36 +02:00
Kristina
0916804b5c con archivo
All checks were successful
Build and Release / build-and-release (push) Successful in 7s
2026-05-16 15:04:57 +02:00
Kristina
9954a9cd0c subo build
All checks were successful
Build and Release / build-and-release (push) Successful in 8s
2026-05-16 15:01:08 +02:00
Kristina
444606d63b subo build 2026-05-16 14:59:57 +02:00
Kristina
4c56d6fc51 subo build 2026-05-16 14:59:17 +02:00
7ecd9a0c7a eliminar built.sh 2026-05-16 12:58:55 +00:00
Kristina
f2a87acdf5 subo built
Some checks failed
Build and Release / build-and-release (push) Failing after 9s
2026-05-16 14:55:48 +02:00
Kristina
12e5e50936 crear releases
Some checks failed
Build and Release / build-and-release (push) Failing after 7s
2026-05-16 14:52:04 +02:00
Kristina
44962fa38b workflow para releases
All checks were successful
prueba release / build-and-release (push) Successful in 11s
2026-05-16 14:21:49 +02:00
Kristina
8317b6ed8c probando8
All checks were successful
Pipeline joseph / verificacion (push) Successful in 10s
2026-05-16 14:18:29 +02:00
Kristina
060ebd950b probando7
Some checks failed
Pipeline joseph / verificacion (push) Has been cancelled
2026-05-16 14:17:47 +02:00
Kristina
e3679eb72b probando6
Some checks are pending
Test workflow / test (push) Waiting to run
2026-05-16 14:16:05 +02:00
Kristina
395537f914 probando5
Some checks failed
Test workflow / test (push) Has been cancelled
2026-05-16 14:14:37 +02:00
Kristina
f3d5bd5354 probando4
Some checks are pending
Test workflow / test (push) Waiting to run
2026-05-16 14:10:23 +02:00
Kristina
1141775b98 probando3
Some checks failed
Test workflow / test (push) Has been cancelled
2026-05-16 13:50:50 +02:00
Kristina
6476669d3b probando2
Some checks failed
Test workflow / test (push) Has been cancelled
2026-05-16 13:36:45 +02:00
Kristina
af968950bd probando
Some checks failed
Test workflow / test (push) Has been cancelled
2026-05-16 13:32:47 +02:00
Kristina
ece9460b43 Release desde cmd 4 2026-05-16 12:02:28 +02:00
4 changed files with 74 additions and 17 deletions

View file

@ -1,4 +1,4 @@
name: Release desde cmd
name: Build and Release
on:
push:
@ -7,28 +7,66 @@ on:
jobs:
build-and-release:
runs-on: docker
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
- name: Ejecutar build
run: |
mkdir -p dist
echo "artefacto" > dist/app.txt
mkdir -p release-dir
echo "# Documento convertido" > release-dir/documento.md
echo "" >> release-dir/documento.md
cat archivo.txt >> release-dir/documento.md
echo "Release $(date +%Y-%m-%d)" > release-dir/version.txt
echo "Build completado"
ls -lh release-dir/
- name: Create release
- name: Crear release
env:
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: |
curl -X POST \
-H "Authorization: token $FORGEJO_TOKEN" \
TAG="${GITHUB_REF_NAME}"
JSON_PAYLOAD=$(cat <<EOF
{
"tag_name": "${TAG}",
"name": "Release ${TAG}",
"body": "Release automatico",
"draft": false,
"prerelease": false
}
EOF
)
echo "Creando release para tag: ${TAG}"
RESPONSE=$(curl -s -X POST \
-H "Authorization: token ${TOKEN}" \
-H "Content-Type: application/json" \
"${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/releases" \
-d "{
\"tag_name\": \"${GITHUB_REF_NAME}\",
\"name\": \"${GITHUB_REF_NAME}\",
\"body\": \"Release automático\",
\"draft\": false,
\"prerelease\": false
}"
-d "${JSON_PAYLOAD}" \
"${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/releases")
echo "Respuesta: ${RESPONSE}"
RELEASE_ID=$(echo "${RESPONSE}" | jq -r '.id')
if [ "${RELEASE_ID}" = "null" ] || [ -z "${RELEASE_ID}" ]; then
echo "Error creando release"
exit 1
fi
echo "Release creado con ID: ${RELEASE_ID}"
for FILE in release-dir/*; do
FILENAME=$(basename "${FILE}")
echo "Subiendo ${FILENAME}..."
curl -X POST \
-H "Authorization: token ${TOKEN}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"${FILE}" \
"${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=${FILENAME}"
done
echo "Release completado correctamente"

3
archivo.txt Normal file
View file

@ -0,0 +1,3 @@
Este es un documento de prueba.
Tiene varias líneas.
Y será convertido a Markdown.

15
build.sh Normal file
View file

@ -0,0 +1,15 @@
#!/bin/bash
# Crear directorio para el release
mkdir -p release-dir
# Convertir txt a md (ejemplo simple)
echo "# Documento convertido" > release-dir/documento.md
echo "" >> release-dir/documento.md
cat archivo.txt >> release-dir/documento.md
# Crear archivo de versión
echo "Release $(date +%Y-%m-%d)" > release-dir/version.txt
echo "Build completado. Archivos en release-dir/"
ls -lh release-dir/

1
test.sh Normal file
View file

@ -0,0 +1 @@
echo "holaaaa"