Skip to content

Commit

Permalink
Add automated draft releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Gumball2415 committed Oct 19, 2023
1 parent 2202050 commit f84bf57
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build-artifact.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: build-artifact
on: push
on:
push:
tags-ignore: **
env:
commithash: ""
jobs:
build-matrix:
runs-on: windows-2022
Expand All @@ -14,11 +18,11 @@ jobs:
- name: Build program
shell: cmd
run: |
for /f "tokens=*" %%a in ('git describe --tags') do (set commithash=%%a)
for /f "tokens=*" %%a in ('git describe --tags') do (set ${{ env.commithash }}=%%a)
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsamd64_x86.bat"
call msbuild -m:5 -nologo -p:Configuration="${{ matrix.configuration }}" -p:Platform="${{ matrix.platform }}"
if %ERRORLEVEL%==1 exit %ERRORLEVEL%
call release.bat ${{ matrix.configuration }} ${{ matrix.platform }} %commithash%_%GITHUB_RUN_ID%
call release.bat ${{ matrix.configuration }} ${{ matrix.platform }} ${{ env.commithash }}_${{ github.run_id }}
- name: Upload binaries
uses: actions/upload-artifact@master
with:
Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/build-release-artifact.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: build-artifact-publish
on:
release:
types: [published]
push:
tags:
- "*"
jobs:
build-matrix-publish:
runs-on: windows-2022
Expand All @@ -18,8 +19,14 @@ jobs:
call msbuild -m:5 -nologo -p:Configuration="${{ matrix.configuration }}" -p:Platform="${{ matrix.platform }}"
if %ERRORLEVEL%==1 exit %ERRORLEVEL%
call release.bat ${{ matrix.configuration }} ${{ matrix.platform }}
- name: Upload binaries
uses: actions/upload-artifact@master
publish-build:
needs: build-matrix-publish
steps:
- name: Upload release
uses: marvinpinto/action-automatic-releases@master
with:
name: Dn-FamiTracker_${{ matrix.platform }}_${{ matrix.configuration }}
path: distribute/*_${{ matrix.platform }}_${{ matrix.configuration }}.7z
repo_token: "${{ secrets.GITHUB_TOKEN }}"
draft: true
prerelease: false
automatic_release_tag: draft
files: distribute/*.7z

0 comments on commit f84bf57

Please sign in to comment.