Skip to content

Commit

Permalink
action upload
Browse files Browse the repository at this point in the history
  • Loading branch information
WentsingNee authored and WentsingNee committed Apr 3, 2024
1 parent f668ed0 commit 8836711
Showing 1 changed file with 50 additions and 1 deletion.
51 changes: 50 additions & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ on:
branches:
- main
- main.fwd
- exp/action

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
KERBAL_BRANCH: main.fwd
KERBAL_BRANCH: exp/action

jobs:
build:
Expand Down Expand Up @@ -190,3 +191,51 @@ jobs:
#
# - name: Run Unit Test
# run: cmake --build ${{github.workspace}}/KerbalTest-build --config ${{env.BUILD_TYPE}} --target runm_utest

cpack:
continue-on-error: true
strategy:
matrix:
include:
- os: ubuntu-latest
cpack_generators: "DEB;STGZ;TGZ;ZIP;"
platform: "ubuntu"
- os: windows-latest
cpack_generators: "NuGet;NSIS;WIX;ZIP;"
platform: "windows"
- os: macos-latest
cpack_generators: "DragNDrop;ZIP;"
platform: "macos"

runs-on: ${{matrix.os}}
needs: build

steps:
- name: Show CPack Generators Support
run: cpack --help

- name: Clone Kerbal
uses: actions/checkout@v4
with:
repository: WentsingNee/Kerbal
ref: ${{env.KERBAL_BRANCH}}
path: Kerbal
submodules: 'true'

- name: CPack Kerbal
run: >
cmake
-S ${{github.workspace}}/Kerbal/
-B ${{github.workspace}}/Kerbal-pack/
-DCMAKE_BUILD_TYPE=Release
-DCPACK_BUNDLE_NAME="Kerbal"
cd ${{github.workspace}}/Kerbal-pack/
cpack -G "${{matrix.cpack_generators}}"
- name: Upload Package
uses: actions/upload-artifact@v4
with:
name: Kerbal-${{matrix.platform}}
path: ${{github.workspace}}/Kerbal-pack/packages

0 comments on commit 8836711

Please sign in to comment.