File tree Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change 1
1
name : Release
2
2
3
3
on :
4
+ push :
5
+ tags :
6
+ - ' v*'
4
7
release :
5
8
types : [published]
6
9
7
10
jobs :
11
+ create_release :
12
+ name : Create Release
13
+ runs-on : ubuntu-latest
14
+ # Only run this job for tag pushes, not for release events
15
+ if : github.event_name == 'push'
16
+ outputs :
17
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
18
+
19
+ steps :
20
+ - name : Create Release
21
+ id : create_release
22
+ uses : actions/create-release@v1
23
+ env :
24
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
25
+ with :
26
+ tag_name : ${{ github.ref_name }}
27
+ release_name : Release ${{ github.ref_name }}
28
+ draft : false
29
+ prerelease : false
30
+
8
31
build :
9
32
name : Build release binaries
10
33
runs-on : ubuntu-latest
34
+ # For tag pushes, wait for create_release job to finish
35
+ needs : [create_release]
36
+ # Skip this condition for release events
37
+ if : github.event_name == 'release' || github.event_name == 'push'
11
38
strategy :
12
39
matrix :
13
40
include :
39
66
env :
40
67
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
41
68
with :
42
- upload_url : ${{ github.event.release.upload_url }}
69
+ # Use the correct upload_url depending on the event type
70
+ upload_url : ${{ github.event_name == 'push' && needs.create_release.outputs.upload_url || github.event.release.upload_url }}
43
71
asset_path : traefik-forward-auth_${{ matrix.suffix }}
44
72
asset_name : traefik-forward-auth_${{ matrix.suffix }}
45
73
asset_content_type : application/octet-stream
You can’t perform that action at this time.
0 commit comments