-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Problem: missing packaging of unreal demo project (fix #86) (#10)
Solution: add release github action
- Loading branch information
1 parent
08dc5ac
commit ed99d9f
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- README.md | ||
tags: | ||
- "v*.*.*" | ||
pull_request: | ||
paths-ignore: | ||
- README.md | ||
|
||
jobs: | ||
linux-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
submodules: recursive | ||
|
||
- name: Prepare Plugin | ||
run: | | ||
cd Plugins/play-unreal-plugin && make | ||
- name: Package For Windows,Mac | ||
run: | | ||
FILENAME="CronosPlayDemo.zip" | ||
cd .. | ||
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/*" | ||
mv ${FILENAME} play-unreal-demo | ||
cd play-unreal-demo | ||
sha256sum ${FILENAME} > "checksums.txt" | ||
echo "release_file=${FILENAME}" >> $GITHUB_ENV | ||
echo "checksum_file=checksums.txt" >> $GITHUB_ENV | ||
- name: Upload binaries and bindings to Release | ||
uses: softprops/action-gh-release@v1 | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
with: | ||
draft: true | ||
files: | | ||
${{ env.release_file }} | ||
${{ env.checksum_file }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|