|
4 | 4 | push: |
5 | 5 | tags: |
6 | 6 | - '*' |
7 | | - branches: |
8 | | - - "actions" |
9 | 7 |
|
10 | 8 | env: |
11 | 9 | EXECUTABLES: "binary" |
@@ -100,28 +98,48 @@ jobs: |
100 | 98 | CCACHE_SLOPPINESS: time_macros |
101 | 99 | OS: windows |
102 | 100 | TARGET: "x86_64" |
| 101 | + BIN_NAME: "Raytracer" |
| 102 | + |
103 | 103 | steps: |
104 | | - - uses: actions/checkout@v4 |
105 | | - - name: Set up cache |
| 104 | + - name: Checkout Repository |
| 105 | + uses: actions/checkout@v4 |
| 106 | + |
| 107 | + - name: Set up Cache |
106 | 108 | uses: actions/cache@v4 |
107 | 109 | with: |
108 | 110 | path: ${{ env.CCACHE_DIR }} |
109 | 111 | key: ${{ runner.os }}-${{ env.TARGET }}-${{ github.sha }} |
110 | 112 | restore-keys: | |
111 | 113 | ${{ runner.os }}-${{ env.TARGET }}- |
| 114 | +
|
112 | 115 | - name: Make artifact folder |
113 | 116 | run: New-Item -Path .\artifacts -ItemType Directory |
| 117 | + |
114 | 118 | - name: Setup MSBuild |
115 | 119 | uses: microsoft/setup-msbuild@v2 |
116 | | - - name: Build |
117 | | - run: msbuild {{ env.MS_BIN_NAME }}.vcxproj /p:Configuration=Release |
118 | | - - name: Pack |
119 | | - run: .\.github\pack\windows.ps1 |
120 | | - - name: Upload |
| 120 | + |
| 121 | + - name: Build Project |
| 122 | + run: msbuild ${{ env.BIN_NAME }}.vcxproj /p:Configuration=Release |
| 123 | + |
| 124 | + - name: Pack Executable into ZIP |
| 125 | + run: | |
| 126 | + mkdir artifacts |
| 127 | + cp .\Release\${{ env.BIN_NAME }}.exe artifacts\ |
| 128 | + cp .\some_dependency.dll artifacts\ # Add other required files |
| 129 | + Compress-Archive -Path artifacts\* -DestinationPath ${{ env.BIN_NAME }}-windows.zip |
| 130 | +
|
| 131 | + - name: Upload ZIP as an Artifact |
121 | 132 | uses: actions/upload-artifact@v4 |
122 | 133 | with: |
123 | 134 | name: ${{ env.OS }}-${{ env.TARGET }} |
124 | | - path: artifacts\ |
| 135 | + path: ${{ env.BIN_NAME }}-windows.zip |
| 136 | + |
| 137 | + - name: Create GitHub Release and Upload ZIP |
| 138 | + uses: softprops/action-gh-release@v1 |
| 139 | + with: |
| 140 | + files: ${{ env.BIN_NAME }}-windows.zip |
| 141 | + env: |
| 142 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
125 | 143 |
|
126 | 144 | release: |
127 | 145 | runs-on: ubuntu-latest |
|
0 commit comments