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:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
tags:
|
||||||
- main
|
- 'v*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
verificacion:
|
build-and-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest # Cambia esto por el label de tu runner
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: Checkout
|
||||||
- name: Mostrar info del entorno
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
echo "Push hecho por: ${{ github.actor }}"
|
mkdir -p dist
|
||||||
echo "Rama: ${{ github.ref }}"
|
echo "hola release" > dist/mi-artefacto.txt
|
||||||
echo "Commit: ${{ github.sha }}"
|
|
||||||
ls -la
|
- 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