Skip to content

Commit a26242b

Browse files
committed
fix: workflow crea el release antes de los builds para evitar race condition
1 parent 83734cb commit a26242b

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,27 @@ on:
44
push:
55
tags:
66
- 'v*'
7-
workflow_dispatch:
87

98
permissions:
109
contents: write
1110

1211
jobs:
12+
# 1. Crea el GitHub Release vacío primero
13+
create-release:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Create GitHub Release
17+
env:
18+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
run: |
20+
gh release create "${{ github.ref_name }}" \
21+
--title "${{ github.ref_name }}" \
22+
--notes "Release ${{ github.ref_name }}" \
23+
--repo "${{ github.repository }}"
24+
25+
# 2. Compila para cada plataforma y sube artefactos al release
1326
build:
27+
needs: create-release
1428
name: Build (${{ matrix.label }})
1529
strategy:
1630
matrix:

0 commit comments

Comments
 (0)