Skip to content

Commit ed99d9f

Browse files
Problem: missing packaging of unreal demo project (fix #86) (#10)
Solution: add release github action
1 parent 08dc5ac commit ed99d9f

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/release.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- README.md
9+
tags:
10+
- "v*.*.*"
11+
pull_request:
12+
paths-ignore:
13+
- README.md
14+
15+
jobs:
16+
linux-build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v2
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
submodules: recursive
23+
24+
- name: Prepare Plugin
25+
run: |
26+
cd Plugins/play-unreal-plugin && make
27+
28+
- name: Package For Windows,Mac
29+
run: |
30+
FILENAME="CronosPlayDemo.zip"
31+
cd ..
32+
zip -r ${FILENAME} play-unreal-demo -x "play-unreal-demo/.git/*" "play-unreal-demo/.git/*" "play-unreal-demo/Plugins/play-unreal-plugin/.git/*" "play-unreal-demo/Plugins/play-unreal-plugin/.github/*" "play-unreal-demo/Plugins/play-unreal-plugin/install/*"
33+
mv ${FILENAME} play-unreal-demo
34+
cd play-unreal-demo
35+
sha256sum ${FILENAME} > "checksums.txt"
36+
echo "release_file=${FILENAME}" >> $GITHUB_ENV
37+
echo "checksum_file=checksums.txt" >> $GITHUB_ENV
38+
39+
40+
- name: Upload binaries and bindings to Release
41+
uses: softprops/action-gh-release@v1
42+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
43+
with:
44+
draft: true
45+
files: |
46+
${{ env.release_file }}
47+
${{ env.checksum_file }}
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+

0 commit comments

Comments
 (0)