Skip to content

Commit b4813e9

Browse files
authored
#GITBUILD test
update old setoutput CI workflows
1 parent fc82a67 commit b4813e9

File tree

1 file changed

+9
-34
lines changed

1 file changed

+9
-34
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ on:
1212
jobs:
1313
# This workflow contains a single job called "build"
1414
build:
15-
# The type of runner that the job will run on
15+
permissions:
16+
contents: write
1617
runs-on: windows-2022
1718

1819
# Steps represent a sequence of tasks that will be executed as part of the job
@@ -229,46 +230,20 @@ jobs:
229230
printf '%s\n' "$COMMITS"
230231
echo 'EOF'
231232
} >> "$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
236235
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
240237
with:
241238
tag_name: ${{ github.run_number }}
242-
release_name: ${{ env.current_datetime }} (${{ github.run_number }})
239+
name: ${{ env.current_datetime }} (${{ github.run_number }})
243240
body: |
244241
Automated Release by GitHub Action CI
245242
246243
### Commits in this release
247244
${{ steps.get_commits.outputs.commits }}
248245
draft: false
249246
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

Comments
 (0)