|
12 | 12 | jobs: |
13 | 13 | # This workflow contains a single job called "build" |
14 | 14 | build: |
15 | | - # The type of runner that the job will run on |
| 15 | + permissions: |
| 16 | + contents: write |
16 | 17 | runs-on: windows-2022 |
17 | 18 |
|
18 | 19 | # Steps represent a sequence of tasks that will be executed as part of the job |
@@ -229,46 +230,20 @@ jobs: |
229 | 230 | printf '%s\n' "$COMMITS" |
230 | 231 | echo 'EOF' |
231 | 232 | } >> "$GITHUB_OUTPUT" |
232 | | - |
233 | | - # Create the release with that commit list |
234 | | - - name: Create Release |
235 | | - id: create_release |
| 233 | + |
| 234 | + - name: Create GitHub Release + Upload Assets |
236 | 235 | if: env.build_trigger == 'true' |
237 | | - uses: actions/create-release@latest |
238 | | - env: |
239 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 236 | + uses: softprops/action-gh-release@v2 |
240 | 237 | with: |
241 | 238 | tag_name: ${{ github.run_number }} |
242 | | - release_name: ${{ env.current_datetime }} (${{ github.run_number }}) |
| 239 | + name: ${{ env.current_datetime }} (${{ github.run_number }}) |
243 | 240 | body: | |
244 | 241 | Automated Release by GitHub Action CI |
245 | 242 | |
246 | 243 | ### Commits in this release |
247 | 244 | ${{ steps.get_commits.outputs.commits }} |
248 | 245 | draft: false |
249 | 246 | prerelease: false |
250 | | - |
251 | | - # Upload the release asset |
252 | | - - name: Upload Release Asset |
253 | | - id: upload-release-asset |
254 | | - if: env.build_trigger == 'true' # Execute only if build was triggered |
255 | | - uses: actions/upload-release-asset@v1 |
256 | | - env: |
257 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
258 | | - with: |
259 | | - upload_url: ${{ steps.create_release.outputs.upload_url }} |
260 | | - asset_path: ./UnityLauncherPro.zip |
261 | | - asset_name: UnityLauncherPro.zip |
262 | | - asset_content_type: application/zip |
263 | | - |
264 | | - # Upload MSI installer to release |
265 | | - - name: Upload MSI Installer |
266 | | - if: env.build_trigger == 'true' |
267 | | - uses: actions/upload-release-asset@v1 |
268 | | - env: |
269 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
270 | | - with: |
271 | | - upload_url: ${{ steps.create_release.outputs.upload_url }} |
272 | | - asset_path: ./UnityLauncherProInstaller/Release/UnityLauncherPro-Installer.msi |
273 | | - asset_name: UnityLauncherPro-Installer.msi |
274 | | - asset_content_type: application/x-msi |
| 247 | + files: | |
| 248 | + ./UnityLauncherPro.zip |
| 249 | + ./UnityLauncherProInstaller/Release/UnityLauncherPro-Installer.msi |
0 commit comments