File tree Expand file tree Collapse file tree 1 file changed +28
-9
lines changed Expand file tree Collapse file tree 1 file changed +28
-9
lines changed Original file line number Diff line number Diff line change 44 workflow_dispatch :
55
66jobs :
7- build-hello-world :
7+ create-release :
88 permissions : write-all
99 runs-on : ubuntu-latest
1010 steps :
1111 - uses : actions/checkout@v4
12+ - name : Create Release
13+ env :
14+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
15+ run : gh release create ${{ github.ref_name }} --generate-notes --title "Version ${{ github.ref_name }}"
16+
17+ build-hello-world :
18+ needs : create-release
19+ permissions : write-all
1220
13- - name : compile and run
14- run : g++ hello_world.cpp -o hello_world_linux
21+ strategy :
22+ matrix :
23+ include :
24+ - os : ubuntu-latest
25+ file_name : hello_world_linux
26+ - os : macos-latest
27+ file_name : hello_world_mac
28+ - os : windows-latest
29+ file_name : hello_world_windows.exe
1530
16- - name : Create Release
31+ runs-on : ${{ matrix.os }}
32+ name : ${{ matrix.os }}
33+
34+ steps :
35+ - uses : actions/checkout@v4
36+ - name : compile
37+ run : g++ hello_world.cpp -o ${{ matrix.file_name }}
38+
39+ - name : Update Release
1740 env :
1841 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
19- run : >-
20- gh release create ${{ github.ref_name }}
21- "hello_world_linux"
22- --generate-notes
23- --title "Version ${{ github.ref_name }}"
42+ run : gh release upload ${{ github.ref_name }} "${{ matrix.file_name}}"
You can’t perform that action at this time.
0 commit comments