Compare commits

..

13 commits
v2.0.1 ... 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
4 changed files with 74 additions and 21 deletions

View file

@ -1,4 +1,4 @@
name: prueba release name: Build and Release
on: on:
push: push:
@ -7,31 +7,66 @@ on:
jobs: jobs:
build-and-release: build-and-release:
runs-on: ubuntu-latest # Cambia esto por el label de tu runner runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Build - name: Ejecutar build
run: | run: |
mkdir -p dist mkdir -p release-dir
echo "hola release" > dist/mi-artefacto.txt 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: env:
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }} TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: | run: |
tag="${GITHUB_REF_NAME}" TAG="${GITHUB_REF_NAME}"
title="$tag"
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" \
-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 \ curl -X POST \
-H "Authorization: token $FORGEJO_TOKEN" \ -H "Authorization: token ${TOKEN}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/octet-stream" \
"${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/releases" \ --data-binary @"${FILE}" \
-d "{ "${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=${FILENAME}"
\"tag_name\": \"${tag}\", done
\"name\": \"${title}\",
\"body\": \"Release creado desde Forgejo Actions\", echo "Release completado correctamente"
\"draft\": false,
\"prerelease\": false
}"

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/

View file

@ -1 +1 @@
echo "holaaaaaa" echo "holaaaa"