From 44962fa38b213bbb5fad6cc2e6cc87b05a78defb Mon Sep 17 00:00:00 2001 From: Kristina Date: Sat, 16 May 2026 14:21:49 +0200 Subject: [PATCH] workflow para releases --- .gitea/workflows/ci.yaml | 42 +++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 21fb882..1e2850a 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -1,17 +1,37 @@ -name: Pipeline joseph +name: prueba release + on: push: - branches: - - main + tags: + - 'v*' jobs: - verificacion: - runs-on: ubuntu-latest + build-and-release: + runs-on: ubuntu-latest # Cambia esto por el label de tu runner steps: - - uses: actions/checkout@v3 - - name: Mostrar info del entorno + - name: Checkout + uses: actions/checkout@v4 + + - name: Build run: | - echo "Push hecho por: ${{ github.actor }}" - echo "Rama: ${{ github.ref }}" - echo "Commit: ${{ github.sha }}" - ls -la \ No newline at end of file + mkdir -p dist + echo "hola release" > dist/mi-artefacto.txt + + - name: Create release + env: + FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }} + run: | + tag="${GITHUB_REF_NAME}" + title="$tag" + + curl -X POST \ + -H "Authorization: token $FORGEJO_TOKEN" \ + -H "Content-Type: application/json" \ + "${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/releases" \ + -d "{ + \"tag_name\": \"${tag}\", + \"name\": \"${title}\", + \"body\": \"Release creado desde Forgejo Actions\", + \"draft\": false, + \"prerelease\": false + }" \ No newline at end of file