Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
HeatXD authored Oct 23, 2024
1 parent 4a1b16c commit 96d7e8c
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,16 @@ jobs:
archive_cmd: tar -czf
platform: macos
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: GekkoLib
steps:
- uses: actions/checkout@v4

- name: Create build directory
run: cmake -E make_directory build
run: cmake -E make_directory GekkoLib/build

- name: Configure CMake (Windows)
if: matrix.os == 'windows-latest'
shell: cmd
working-directory: GekkoLib
run: >-
cmake -B build
-DCMAKE_BUILD_TYPE=Release
Expand All @@ -49,6 +47,7 @@ jobs:
- name: Configure CMake (Unix)
if: matrix.os != 'windows-latest'
shell: bash
working-directory: GekkoLib
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
Expand All @@ -57,9 +56,12 @@ jobs:
.
- name: Build
working-directory: GekkoLib
run: cmake --build build --config Release

- name: Prepare files for packaging
working-directory: GekkoLib
shell: bash
run: |
mkdir -p package/Release/lib
mkdir -p package/Release/include
Expand All @@ -69,16 +71,17 @@ jobs:
else
cp build/* package/Release/lib/ || true
fi
shell: bash
- name: Create Windows Archive
if: matrix.os == 'windows-latest'
working-directory: GekkoLib
run: |
cd package
7z a ../GekkoNet-${{ matrix.platform }}-${{ matrix.build_type }}-${{ matrix.asio }}-Release.${{ matrix.archive_ext }} *
- name: Create Unix Archive
if: matrix.os != 'windows-latest'
working-directory: GekkoLib
run: |
cd package
tar -czf ../GekkoNet-${{ matrix.platform }}-${{ matrix.build_type }}-${{ matrix.asio }}-Release.${{ matrix.archive_ext }} *
Expand All @@ -87,7 +90,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: GekkoNet-${{ matrix.platform }}-${{ matrix.build_type }}-${{ matrix.asio }}-Release.${{ matrix.archive_ext }}
path: GekkoNet-${{ matrix.platform }}-${{ matrix.build_type }}-${{ matrix.asio }}-Release.${{ matrix.archive_ext }}
path: GekkoLib/GekkoNet-${{ matrix.platform }}-${{ matrix.build_type }}-${{ matrix.asio }}-Release.${{ matrix.archive_ext }}
retention-days: 1

create_release:
Expand All @@ -97,6 +100,8 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- name: Get version
id: version
run: |
Expand All @@ -107,11 +112,14 @@ jobs:
with:
path: artifacts

- name: Display structure of downloaded files
run: ls -R artifacts

- name: Move artifacts to root
run: |
mkdir releases
find artifacts -type f -name "*.zip" -o -name "*.tar.gz" | while read file; do
mv "$file" releases/
cp "$file" releases/
done
- name: Create Release
Expand Down

0 comments on commit 96d7e8c

Please sign in to comment.