Skip to content

Commit

Permalink
Update build-component.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
s0hv authored May 26, 2024
1 parent 3c10ff2 commit 0933c01
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/build-component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ jobs:
run: |
echo "BUILD_CONFIGURATION=${{ env.BUILD_CONFIGURATION }}" >> $GITHUB_OUTPUT
echo "PLATFORM=${{ env.PLATFORM }}" >> $GITHUB_OUTPUT
echo "Debug=${{ contains(fromJSON(format('[{0}]', needs.compute.outputs.BUILD_CONFIGURATION)), 'Debug') }}" >> $GITHUB_OUTPUT
echo "Release=${{ contains(fromJSON(format('[{0}]', needs.compute.outputs.BUILD_CONFIGURATION)), 'Release') }}" >> $GITHUB_OUTPUT
build:
runs-on: windows-2022
Expand Down Expand Up @@ -154,7 +157,7 @@ jobs:
CHANGELOG.md
pack-component:
needs: [build]
needs: [build, compute]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -165,39 +168,34 @@ jobs:
merge-multiple: true
path: './_result'

- name: Output
run: |
echo "Debug=${{ contains(fromJSON(format('[{0}]', needs.compute.outputs.BUILD_CONFIGURATION)), 'Debug') }}" >> $GITHUB_OUTPUT
echo "Release=${{ contains(fromJSON(format('[{0}]', needs.compute.outputs.BUILD_CONFIGURATION)), 'Release') }}" >> $GITHUB_OUTPUT
- uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Pack component Release
if: ${{ env.Release }}
if: ${{ needs.compute.outputs.Release }}
run: 'python scripts/pack_component.py'

- name: Pack component Debug
if: ${{ env.Debug }}
if: ${{ needs.compute.outputs.Debug }}
run: 'python scripts/pack_component.py --debug'

- name: Upload build artifact Release
if: ${{ !startsWith(github.ref, 'refs/tags/') && env.Release == 'true' }}
if: ${{ !startsWith(github.ref, 'refs/tags/') && needs.compute.outputs.Release }}
uses: actions/upload-artifact@v4
with:
name: 'foo_discord_rich.fb2k-component'
path: _result/Win32_Release/foo_discord_rich.fb2k-component

- name: Upload build artifact Debug
if: ${{ !startsWith(github.ref, 'refs/tags/') && env.Debug == 'true' }}
if: ${{ !startsWith(github.ref, 'refs/tags/') && needs.compute.outputs.Debug }}
uses: actions/upload-artifact@v4
with:
name: 'foo_discord_rich.fb2k-component_debug'
path: _result/Win32_Debug/foo_discord_rich.fb2k-component

- name: Upload release debug symbols
if: ${{ !startsWith(github.ref, 'refs/tags/') && env.Release == 'true' }}
if: ${{ !startsWith(github.ref, 'refs/tags/') && needs.compute.outputs.Release }}
uses: actions/upload-artifact@v4
with:
name: foo_discord_rich_pdb.zip
Expand Down

0 comments on commit 0933c01

Please sign in to comment.