Skip to content

Commit

Permalink
Upgrade build.yaml versions (#36)
Browse files Browse the repository at this point in the history
also, resolving v4 issues (no more multiple uploads of same file name is allowed)
  • Loading branch information
zaafar committed Apr 30, 2024
1 parent 6d95264 commit 8ba6ae4
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

- name: Setup .NET
if: matrix.os == 'windows-latest'
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x

Expand All @@ -54,10 +54,10 @@ jobs:
shell: bash

- name: Upload source package
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: matrix.os == 'windows-latest' && matrix.architecture == 'x64'
with:
name: win-x64
name: win-x64-source
path: bin\Packages\Release\*.nupkg

- name: Publish untagged source package to MyGet
Expand All @@ -82,40 +82,33 @@ jobs:
shell: bash

- name: Upload win-${{ matrix.architecture }} ${{ github.event.inputs.ReleaseType || 'Release' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: matrix.os == 'windows-latest'
with:
name: win-${{ matrix.architecture }}
path: cimgui\build\${{ matrix.architecture }}\${{ github.event.inputs.ReleaseType || 'Release' }}\*

- name: Upload ${{ matrix.os }} ${{ github.event.inputs.ReleaseType || 'Release' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
with:
name: ${{ matrix.os }}-x64
path: cimgui/build/${{ github.event.inputs.ReleaseType || 'Release' }}/*

- name: Upload Definitions Json File
uses: actions/upload-artifact@v3
- name: Upload Json Files
uses: actions/upload-artifact@v4
if: matrix.os == 'windows-latest' && matrix.architecture == 'x64'
with:
name: JsonFiles
path: cimgui\generator\output\definitions.json

- name: Upload structs_and_enums Json File
uses: actions/upload-artifact@v3
if: matrix.os == 'windows-latest' && matrix.architecture == 'x64'
with:
name: JsonFiles
path: cimgui\generator\output\structs_and_enums.json
path: cimgui\generator\output\*.json

CreateReleaseOnTagCreate:
runs-on: ubuntu-latest
needs: [Build]
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- name: Rename win-x64 and win-x86 artifacts
run: |
Expand All @@ -125,7 +118,7 @@ jobs:
mv win-ARM/cimgui.dll win-ARM/cimgui.win-arm.dll
- name: Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: |
win-x64/cimgui.win-x64.dll
Expand Down

0 comments on commit 8ba6ae4

Please sign in to comment.