diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 262dde8e..f7865218 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,7 @@ jobs: steps: # Checkout project - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true @@ -89,17 +89,41 @@ jobs: run: ctest . -C $BUILD_TYPE -V # Copy all build artifacts to the bin directory - - name: Install + - name: Install CL working-directory: ${{github.workspace}}/build shell: bash - run: cmake --install . --config $BUILD_TYPE --prefix bin --component cl + run: cmake --install . --config $BUILD_TYPE --prefix comp_cl --component cl # Upload bin directory as artifact - name: Upload Binary Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.artifact }}-cl + path: build/comp_cl/ + + - name: Install LIB + working-directory: ${{github.workspace}}/build + shell: bash + run: cmake --install . --config $BUILD_TYPE --prefix comp_lib --component lib + + # Upload bin directory as artifact + - name: Upload Binary Artifact + uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.artifact }}-lib + path: build/comp_lib/ + + - name: Install UE + working-directory: ${{github.workspace}}/build + shell: bash + run: cmake --install . --config $BUILD_TYPE --prefix comp_unreal --component unreal + + # Upload bin directory as artifact + - name: Upload Binary Artifact + uses: actions/upload-artifact@v3 with: - name: ${{ matrix.artifact }} - path: build/bin/ + name: ${{ matrix.artifact }}-unreal + path: build/comp_unreal/ # Make sure Inkproof has everything it needs to run our executable - name: Setup Ink Proof @@ -111,7 +135,7 @@ jobs: cp ../inkcpp_runtime_driver drivers/ chmod +x drivers/inkcpp_runtime_driver mkdir deps/inkcpp - cp ../../build/bin/* deps/inkcpp/ + cp ../../build/comp_cl/* deps/inkcpp/ chmod +x deps/inkcpp/inkcpp_cl # Run it @@ -187,7 +211,7 @@ jobs: runs-on: ubuntu-latest if: github.ref == 'refs/heads/master' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 # Download Ink Proof page for Linux - uses: actions/download-artifact@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..924ebe8a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,38 @@ +name: Create release + +on: + push: + tags: + - v* + +permissions: + contents: write + +jobs: + release: + name: Release pushed tag + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - name: Download artifacts + uses: marcofaggian/action-download-multiple-artifacts@v3.0.8 + with: + names: linux-cl linux-lib linux-unreal macos-cl macos-lib macos-unreal win64-cl win64-lib win64-unreal + paths: linux-cl linux-lib linux-unreal macos-cl macos-lib macos-unreal win64-cl win64-lib win64-unreal + workflow: build.yml + branch: master + - name: Zip + run: | + for f in linux-cl linux-lib linux-unreal macos-cl macos-lib macos-unreal win64-cl win64-lib win64-unreal; do zip -r $f $f; done + - name: List + run: tree + - name: Create release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.ref_name }} + run: | + gh release create \ + --repo="$GITHUB_REPOSITORY" \ + --title="${GITHUB_REPOSITORY#*/} ${tag#v}" \ + --generate-notes \ + "$tag" "linux-cl.zip" "linux-lib.zip" "linux-unreal.zip" "macos-cl.zip" "macos-lib.zip" "macos-unreal.zip" "win64-cl.zip" "win64-lib.zip" "win64-unreal.zip"