workflow para releases
All checks were successful
prueba release / build-and-release (push) Successful in 11s
All checks were successful
prueba release / build-and-release (push) Successful in 11s
This commit is contained in:
parent
8317b6ed8c
commit
44962fa38b
1 changed files with 31 additions and 11 deletions
|
|
@ -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
|
||||
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
|
||||
}"
|
||||
Loading…
Reference in a new issue