From 16449a0508137831a1f08e2349e1360a9c3bc992 Mon Sep 17 00:00:00 2001 From: Kohki Akikaze <67105596+kazasaku@users.noreply.github.com> Date: Thu, 13 May 2021 17:45:08 +0900 Subject: [PATCH 1/4] =?UTF-8?q?GitHub=20Actions=20=E3=81=A7=E3=83=93?= =?UTF-8?q?=E3=83=AB=E3=83=89=E3=81=99=E3=82=8B=E6=99=82=E3=82=82=E5=BF=85?= =?UTF-8?q?=E8=A6=81=E3=81=AA=E7=92=B0=E5=A2=83=E5=A4=89=E6=95=B0=E3=82=92?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-sakura.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.github/workflows/build-sakura.yml b/.github/workflows/build-sakura.yml index f93b306441..2e0817a46c 100644 --- a/.github/workflows/build-sakura.yml +++ b/.github/workflows/build-sakura.yml @@ -44,6 +44,11 @@ jobs: platform: - Win32 - x64 + env: + CI_ACCOUNT_NAME: ${{github.actor}} + CI_REPO_NAME: ${{github.repository}} + CI_BUILD_VERSION: ${{github.run_id}} + CI_BUILD_NUMBER: ${{github.run_number}} # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -54,6 +59,30 @@ jobs: - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v1 + - name: Setup environment variables + run: | + echo("CI_BUILD_URL=" ` + + "${env:GITHUB_SERVER_URL}/${{github.repository}}/" ` + + "actions/runs/${{github.run_id}}") >> $env:GITHUB_ENV + + echo("GITHUB_COMMIT_URL=" ` + + "${env:GITHUB_SERVER_URL}/${{github.repository}}/" ` + + "commit/${{github.sha}}") >> $env:GITHUB_ENV + + if ('pull_request' -eq '${{github.event_name}}') { + echo("GITHUB_PR_NUMBER=" ` + + "${{github.event.pull_request.number}}") >> $env:GITHUB_ENV + echo("GITHUB_PR_HEAD_SHORT_COMMIT=" ` + + "${{github.event.pull_request.head.sha}}".SubString(0, 8)) >> $env:GITHUB_ENV + echo("GITHUB_PR_HEAD_COMMIT=" ` + + "${{github.event.pull_request.head.sha}}") >> $env:GITHUB_ENV + echo("GITHUB_PR_HEAD_URL=" ` + + "${env:GITHUB_SERVER_URL}/${{github.repository}}/" ` + + "pull/${{github.event.pull_request.number}}/" ` + + "commits/${{github.event.pull_request.head.sha}}") >> $env:GITHUB_ENV + } + shell: pwsh + - name: MSBuild run: build-sln.bat ${{ matrix.platform }} ${{ matrix.config }} shell: cmd From ff15c35e41559bf47e58e858ea7985d5d4a060c4 Mon Sep 17 00:00:00 2001 From: Kohki Akikaze <67105596+kazasaku@users.noreply.github.com> Date: Fri, 14 May 2021 07:44:17 +0900 Subject: [PATCH 2/4] =?UTF-8?q?githash.bat=20=E3=81=AB=E3=81=8A=E3=81=91?= =?UTF-8?q?=E3=82=8B=20GITHUB=5FPR=5FHEAD=5FSHORT=5FCOMMIT=20=E3=81=AE?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E6=96=B9=E6=B3=95=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sakura/githash.bat | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sakura/githash.bat b/sakura/githash.bat index 7c27175313..8ecfbdad37 100644 --- a/sakura/githash.bat +++ b/sakura/githash.bat @@ -112,17 +112,13 @@ exit /b 0 ) if defined APPVEYOR_PULL_REQUEST_HEAD_COMMIT ( + set GITHUB_PR_HEAD_SHORT_COMMIT=%APPVEYOR_PULL_REQUEST_HEAD_COMMIT:~0,8% set GITHUB_PR_HEAD_COMMIT=%APPVEYOR_PULL_REQUEST_HEAD_COMMIT% ) else if defined SYSTEM_PULLREQUEST_SOURCECOMMITID ( + set GITHUB_PR_HEAD_SHORT_COMMIT=%SYSTEM_PULLREQUEST_SOURCECOMMITID:~0,8% set GITHUB_PR_HEAD_COMMIT=%SYSTEM_PULLREQUEST_SOURCECOMMITID% ) - if not "%GITHUB_PR_HEAD_COMMIT%" == "" ( - set GITHUB_PR_HEAD_SHORT_COMMIT=%GITHUB_PR_HEAD_COMMIT:~0,8% - ) else ( - set GITHUB_PR_HEAD_SHORT_COMMIT= - ) - if "%BUILD_REPOSITORY_PROVIDER%"=="GitHub" ( set GITHUB_ON=1 ) From 04595d8c0069c8915ccf79dad9be8576277e474f Mon Sep 17 00:00:00 2001 From: Kohki Akikaze <67105596+kazasaku@users.noreply.github.com> Date: Wed, 12 May 2021 01:44:42 +0900 Subject: [PATCH 3/4] =?UTF-8?q?githash.bat=20=E3=81=AE=E3=83=AD=E3=82=B0?= =?UTF-8?q?=E3=81=AB=20GITHUB=5FPR=5FNUMBER=20=E3=82=92=E5=87=BA=E5=8A=9B?= =?UTF-8?q?=E3=81=95=E3=81=9B=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sakura/githash.bat | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sakura/githash.bat b/sakura/githash.bat index 8ecfbdad37..ca959b6cb7 100644 --- a/sakura/githash.bat +++ b/sakura/githash.bat @@ -187,24 +187,26 @@ exit /b 0 del "%GITHASH_H_TMP%" @echo %GITHASH_H% was not updated. ) else ( + @echo GIT_TAG_NAME : %GIT_TAG_NAME% @echo GIT_SHORT_COMMIT_HASH : %GIT_SHORT_COMMIT_HASH% @echo GIT_COMMIT_HASH : %GIT_COMMIT_HASH% @echo GIT_REMOTE_ORIGIN_URL : %GIT_REMOTE_ORIGIN_URL% - @echo GIT_TAG_NAME : %GIT_TAG_NAME% @echo. + @echo CI_ACCOUNT_NAME : %CI_ACCOUNT_NAME% @echo CI_REPO_NAME : %CI_REPO_NAME% - @echo CI_ACCOUNT_NAME : %CI_ACCOUNT_NAME% - @echo CI_BUILD_VERSION : %CI_BUILD_VERSION% - @echo CI_BUILD_NUMBER : %CI_BUILD_NUMBER% - @echo CI_BUILD_URL : %CI_BUILD_URL% + @echo CI_BUILD_VERSION : %CI_BUILD_VERSION% + @echo CI_BUILD_NUMBER : %CI_BUILD_NUMBER% + @echo CI_BUILD_URL : %CI_BUILD_URL% @echo. @echo GITHUB_COMMIT_URL : %GITHUB_COMMIT_URL% - @echo GITHUB_PR_HEAD_URL : %GITHUB_PR_HEAD_URL% - @echo GITHUB_PR_HEAD_COMMIT : %GITHUB_PR_HEAD_COMMIT% + @echo GITHUB_PR_NUMBER : %GITHUB_PR_NUMBER% @echo GITHUB_PR_HEAD_SHORT_COMMIT : %GITHUB_PR_HEAD_SHORT_COMMIT% + @echo GITHUB_PR_HEAD_COMMIT : %GITHUB_PR_HEAD_COMMIT% + @echo GITHUB_PR_HEAD_URL : %GITHUB_PR_HEAD_URL% @echo. @echo APPVEYOR_URL : %APPVEYOR_URL% @echo APPVEYOR_PROJECT_SLUG : %APPVEYOR_PROJECT_SLUG% + @echo. if exist "%GITHASH_H%" del "%GITHASH_H%" move /y "%GITHASH_H_TMP%" "%GITHASH_H%" From cf59e152fe4e7a92422fdb8776624c9b6d7d18d5 Mon Sep 17 00:00:00 2001 From: Kohki Akikaze <67105596+kazasaku@users.noreply.github.com> Date: Sat, 15 May 2021 12:53:21 +0900 Subject: [PATCH 4/4] =?UTF-8?q?=E8=A8=98=E8=BF=B0=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E3=82=92=E3=81=BE=E3=81=A8=E3=82=81=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-sakura.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-sakura.yml b/.github/workflows/build-sakura.yml index 2e0817a46c..6d7c69e703 100644 --- a/.github/workflows/build-sakura.yml +++ b/.github/workflows/build-sakura.yml @@ -44,11 +44,6 @@ jobs: platform: - Win32 - x64 - env: - CI_ACCOUNT_NAME: ${{github.actor}} - CI_REPO_NAME: ${{github.repository}} - CI_BUILD_VERSION: ${{github.run_id}} - CI_BUILD_NUMBER: ${{github.run_number}} # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -61,6 +56,11 @@ jobs: - name: Setup environment variables run: | + echo "CI_ACCOUNT_NAME=${{github.actor}}" >> $env:GITHUB_ENV + echo "CI_REPO_NAME=${{github.repository}}" >> $env:GITHUB_ENV + echo "CI_BUILD_VERSION=${{github.run_id}}" >> $env:GITHUB_ENV + echo "CI_BUILD_NUMBER=${{github.run_number}}" >> $env:GITHUB_ENV + echo("CI_BUILD_URL=" ` + "${env:GITHUB_SERVER_URL}/${{github.repository}}/" ` + "actions/runs/${{github.run_id}}") >> $env:GITHUB_ENV