Skip to content

Commit e6f951a

Browse files
authored
Add Release Page workflow (#62)
Add Workflow to create automated release if a tag is pushed.
1 parent 3c60e7c commit e6f951a

File tree

2 files changed

+70
-8
lines changed

2 files changed

+70
-8
lines changed

.github/workflows/build.yml

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
steps:
3535

3636
# Checkout project
37-
- uses: actions/checkout@v2
37+
- uses: actions/checkout@v3
3838
with:
3939
submodules: true
4040

@@ -89,17 +89,41 @@ jobs:
8989
run: ctest . -C $BUILD_TYPE -V
9090

9191
# Copy all build artifacts to the bin directory
92-
- name: Install
92+
- name: Install CL
9393
working-directory: ${{github.workspace}}/build
9494
shell: bash
95-
run: cmake --install . --config $BUILD_TYPE --prefix bin --component cl
95+
run: cmake --install . --config $BUILD_TYPE --prefix comp_cl --component cl
9696

9797
# Upload bin directory as artifact
9898
- name: Upload Binary Artifact
99-
uses: actions/upload-artifact@v2
99+
uses: actions/upload-artifact@v3
100+
with:
101+
name: ${{ matrix.artifact }}-cl
102+
path: build/comp_cl/
103+
104+
- name: Install LIB
105+
working-directory: ${{github.workspace}}/build
106+
shell: bash
107+
run: cmake --install . --config $BUILD_TYPE --prefix comp_lib --component lib
108+
109+
# Upload bin directory as artifact
110+
- name: Upload Binary Artifact
111+
uses: actions/upload-artifact@v3
112+
with:
113+
name: ${{ matrix.artifact }}-lib
114+
path: build/comp_lib/
115+
116+
- name: Install UE
117+
working-directory: ${{github.workspace}}/build
118+
shell: bash
119+
run: cmake --install . --config $BUILD_TYPE --prefix comp_unreal --component unreal
120+
121+
# Upload bin directory as artifact
122+
- name: Upload Binary Artifact
123+
uses: actions/upload-artifact@v3
100124
with:
101-
name: ${{ matrix.artifact }}
102-
path: build/bin/
125+
name: ${{ matrix.artifact }}-unreal
126+
path: build/comp_unreal/
103127

104128
# Make sure Inkproof has everything it needs to run our executable
105129
- name: Setup Ink Proof
@@ -111,7 +135,7 @@ jobs:
111135
cp ../inkcpp_runtime_driver drivers/
112136
chmod +x drivers/inkcpp_runtime_driver
113137
mkdir deps/inkcpp
114-
cp ../../build/bin/* deps/inkcpp/
138+
cp ../../build/comp_cl/* deps/inkcpp/
115139
chmod +x deps/inkcpp/inkcpp_cl
116140
117141
# Run it
@@ -187,7 +211,7 @@ jobs:
187211
runs-on: ubuntu-latest
188212
if: github.ref == 'refs/heads/master'
189213
steps:
190-
- uses: actions/checkout@v2
214+
- uses: actions/checkout@v3
191215

192216
# Download Ink Proof page for Linux
193217
- uses: actions/download-artifact@v2

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Create release
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
name: Release pushed tag
14+
runs-on: ubuntu-22.04
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Download artifacts
18+
uses: marcofaggian/action-download-multiple-artifacts@v3.0.8
19+
with:
20+
names: linux-cl linux-lib linux-unreal macos-cl macos-lib macos-unreal win64-cl win64-lib win64-unreal
21+
paths: linux-cl linux-lib linux-unreal macos-cl macos-lib macos-unreal win64-cl win64-lib win64-unreal
22+
workflow: build.yml
23+
branch: master
24+
- name: Zip
25+
run: |
26+
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
27+
- name: List
28+
run: tree
29+
- name: Create release
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
tag: ${{ github.ref_name }}
33+
run: |
34+
gh release create \
35+
--repo="$GITHUB_REPOSITORY" \
36+
--title="${GITHUB_REPOSITORY#*/} ${tag#v}" \
37+
--generate-notes \
38+
"$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"

0 commit comments

Comments
 (0)