diff --git a/.github/workflows/build-artifact.yml b/.github/workflows/build-artifact.yml index 21757de1..d9a7d907 100644 --- a/.github/workflows/build-artifact.yml +++ b/.github/workflows/build-artifact.yml @@ -10,7 +10,7 @@ jobs: platform: [x64, Win32] configuration: [Release, Debug, ASAN-Release, ASAN-Debug] steps: - - uses: actions/checkout@master + - uses: actions/checkout@v4 with: submodules: "recursive" fetch-depth: 0 @@ -28,7 +28,7 @@ jobs: if %ERRORLEVEL%==1 exit %ERRORLEVEL% call release.bat ${{ matrix.configuration }} ${{ matrix.platform }} ${{ env.commithash }}_${{ github.run_id }} - name: Upload binaries - uses: actions/upload-artifact@master + uses: actions/upload-artifact@v4 with: name: Dn-FamiTracker_${{ env.commithash }}_${{ github.run_id }}_${{ matrix.platform }}_${{ matrix.configuration }} path: distribute/*_${{ matrix.platform }}_${{ matrix.configuration }}.7z diff --git a/.github/workflows/build-release-artifact.yml b/.github/workflows/build-release-artifact.yml index 4dc3572f..be7fb86b 100644 --- a/.github/workflows/build-release-artifact.yml +++ b/.github/workflows/build-release-artifact.yml @@ -3,6 +3,8 @@ on: push: tags: - "*" +env: + commithash: "" jobs: build-matrix-publish: runs-on: windows-2022 @@ -11,13 +13,16 @@ jobs: platform: [x64, Win32] # configuration is Release only steps: - - uses: actions/checkout@master + - uses: actions/checkout@v4 with: submodules: "recursive" fetch-depth: 0 - uses: r-lib/actions/setup-pandoc@v2 with: pandoc-version: '3.1.8' + - name: Set commit hash variable + shell: powershell + run: echo "commithash=$(git describe --tags)" >> $env:GITHUB_ENV - name: Build program shell: cmd run: | @@ -26,19 +31,24 @@ jobs: if %ERRORLEVEL%==1 exit %ERRORLEVEL% call release.bat Release ${{ matrix.platform }} - name: Upload binaries - uses: actions/upload-artifact@master + uses: actions/upload-artifact@v4 with: + name: Dn-FamiTracker_${{ env.commithash }}_${{ github.run_id }}_${{ matrix.platform }} path: distribute/*_${{ matrix.platform }}_Release.7z publish-build: needs: build-matrix-publish runs-on: windows-2022 steps: - - uses: actions/download-artifact@master - name: Download binaries - shell: powershell - run: ls -R + uses: actions/download-artifact@v4 + with: + path: Dn-FamiTracker_ + pattern: Dn-FamiTracker_* + merge-multiple: true + shell: powershell + - run: ls -R - name: Upload release - uses: marvinpinto/action-automatic-releases@master + uses: marvinpinto/action-automatic-releases@v1.2.1 with: repo_token: "${{ secrets.GITHUB_TOKEN }}" draft: true