Skip to content

Commit

Permalink
fix action
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-calautti committed Dec 27, 2023
1 parent 9e8f9e1 commit 4b47fb8
Showing 1 changed file with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,48 +49,48 @@ jobs:
with:
submodules: recursive

- name: Pull dependencies
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt install -y build-essential cmake git libgtk-3-dev
- name: Pull dependencies
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt install -y build-essential cmake git libgtk-3-dev

- name: Configure CMake
if: startsWith(matrix.os, 'windows')
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DwxBUILD_SHARED=${{env.wxBUILD_SHARED}} -DwxBUILD_USE_STATIC_RUNTIME=${{env.wxBUILD_USE_STATIC_RUNTIME}}
if: startsWith(matrix.os, 'ubuntu')
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DwxBUILD_SHARED=${{env.wxBUILD_SHARED}}
if: startsWith(matrix.os, 'macOS')
run: cmake -B ${{github.workspace}}/build -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DwxBUILD_SHARED=${{env.wxBUILD_SHARED}} -DwxBUILD_USE_STATIC_RUNTIME=${{env.wxBUILD_USE_STATIC_RUNTIME}}
- name: Configure CMake
if: startsWith(matrix.os, 'windows')
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DwxBUILD_SHARED=${{env.wxBUILD_SHARED}} -DwxBUILD_USE_STATIC_RUNTIME=${{env.wxBUILD_USE_STATIC_RUNTIME}}
if: startsWith(matrix.os, 'ubuntu')
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DwxBUILD_SHARED=${{env.wxBUILD_SHARED}}
if: startsWith(matrix.os, 'macOS')
run: cmake -B ${{github.workspace}}/build -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DwxBUILD_SHARED=${{env.wxBUILD_SHARED}} -DwxBUILD_USE_STATIC_RUNTIME=${{env.wxBUILD_USE_STATIC_RUNTIME}}

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 2

- name: Package
if: startsWith(matrix.os, 'macOS')
run: |
cp ${{github.workspace}}/CHANGELOG.txt ${{github.workspace}}/build/app
cd ${{github.workspace}}/build/app
zip -r ${{ matrix.release_package }}.zip DeltaPatcher.app/ CHANGELOG.txt
if: startsWith(matrix.os, 'windows')
run: |
cp ${{github.workspace}}/CHANGELOG.txt ${{github.workspace}}/build/app/Release/
cd ${{github.workspace}}/build/app/Release
zip ${{ matrix.release_package }}.zip DeltaPatcher.exe CHANGELOG.txt
if: startsWith(matrix.os, 'ubuntu')
run: |
cp ${{github.workspace}}/CHANGELOG.txt ${{github.workspace}}/build/app/
cd ${{github.workspace}}/build/app/
zip ${{ matrix.release_package }}.zip DeltaPatcher CHANGELOG.txt
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 2
- name: Package
if: startsWith(matrix.os, 'macOS')
run: |
cp ${{github.workspace}}/CHANGELOG.txt ${{github.workspace}}/build/app
cd ${{github.workspace}}/build/app
zip -r ${{ matrix.release_package }}.zip DeltaPatcher.app/ CHANGELOG.txt
if: startsWith(matrix.os, 'windows')
run: |
cp ${{github.workspace}}/CHANGELOG.txt ${{github.workspace}}/build/app/Release/
cd ${{github.workspace}}/build/app/Release
zip ${{ matrix.release_package }}.zip DeltaPatcher.exe CHANGELOG.txt
if: startsWith(matrix.os, 'ubuntu')
run: |
cp ${{github.workspace}}/CHANGELOG.txt ${{github.workspace}}/build/app/
cd ${{github.workspace}}/build/app/
zip ${{ matrix.release_package }}.zip DeltaPatcher CHANGELOG.txt
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.release_package }}
path: ${{github.workspace}}/build/app/${{ matrix.release_package }}.zip
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.release_package }}
path: ${{github.workspace}}/build/app/${{ matrix.release_package }}.zip

if: contains(github.ref, 'refs/tags/')
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.create_release.outputs.tag-name }}
files: ${{ matrix.release_package }}.zip
if: contains(github.ref, 'refs/tags/')
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.create_release.outputs.tag-name }}
files: ${{ matrix.release_package }}.zip


0 comments on commit 4b47fb8

Please sign in to comment.