Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Release Page workflow #62

Merged
merged 14 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 32 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
steps:

# Checkout project
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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"