Skip to content

unreal publish

unreal publish #14

name: unreal publish
on:
workflow_dispatch:
inputs:
publish_version:
description: 'publish_version'
required: true
env:
UE424_V8: "https://github.com/puerts/backend-v8/releases/download/v8_for_ue424_or_below/v8_for_ue424_or_below.tgz"
V8_84: "https://github.com/puerts/backend-v8/releases/download/V8_8.4.371.19_230822/v8_bin_8.4.371.19.tgz"
V8_94: "https://github.com/puerts/backend-v8/releases/download/V8_9.4.146.24_230822/v8_bin_9.4.146.24.tgz"
quickjs: "https://github.com/puerts/backend-quickjs/releases/download/QJS_231011/qjs_v8_bin.tgz"
nodejs: "https://github.com/puerts/backend-nodejs/releases/download/NodeJS_16.16.0_221228/nodejs_bin_16.16.0.tgz"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create Release Asset
run: |
cp -r README.md LICENSE doc unreal
wget -O v8_for_ue425.tgz -q ${{env.V8_84}}
tar xvfz v8_for_ue425.tgz -C unreal/Puerts/ThirdParty
cd unreal
tar cvfz puerts_v8_84.tgz Puerts README.md LICENSE doc
mv puerts_v8_84.tgz ..
cd ..
rm -r unreal/Puerts/ThirdParty/v8
wget -O v8_94.tgz -q ${{env.V8_94}}
tar xvfz v8_94.tgz -C unreal/Puerts/ThirdParty
mv unreal/Puerts/ThirdParty/v8_9.4 unreal/Puerts/ThirdParty/v8
cd unreal
tar cvfz puerts_v8_94.tgz Puerts README.md LICENSE doc
mv puerts_v8_94.tgz ..
cd ..
rm -r unreal/Puerts/ThirdParty/v8
wget -O v8_for_ue424.tgz -q ${{env.UE424_V8}}
tar xvfz v8_for_ue424.tgz -C unreal/Puerts/ThirdParty
cd unreal
tar cvfz puerts_v8_for_ue424_or_below.tgz Puerts README.md LICENSE doc
mv puerts_v8_for_ue424_or_below.tgz ..
cd ..
rm -r unreal/Puerts/ThirdParty/v8_for_ue424_or_below
wget -O quickjs.tgz -q ${{env.quickjs}}
tar xvfz quickjs.tgz -C unreal/Puerts/ThirdParty
cd unreal
sed -i 's/UseQuickjs = false/UseQuickjs = true/g' Puerts/Source/JsEnv/JsEnv.Build.cs
tar cvfz puerts_quickjs.tgz Puerts README.md LICENSE doc
mv puerts_quickjs.tgz ..
cd ..
rm -r unreal/Puerts/ThirdParty/quickjs
git checkout .
wget -O nodejs_bin.tgz -q ${{env.nodejs}}
tar xvfz nodejs_bin.tgz -C unreal/Puerts/ThirdParty
cd unreal
sed -i 's/UseNodejs = false/UseNodejs = true/g' Puerts/Source/JsEnv/JsEnv.Build.cs
tar cvfz puerts_nodejs.tgz Puerts README.md LICENSE doc
mv puerts_nodejs.tgz ..
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: |
mac下如果遇到移入废纸篓问题,请
~~~bash
cd Plugins/Puerts/ThirdParty
find . -name "*.dylib" | xargs sudo xattr -r -d com.apple.quarantine
~~~
tag_name: Unreal_v${{ github.event.inputs.publish_version }}
release_name: Unreal_v${{ github.event.inputs.publish_version }}
draft: false
prerelease: false
- name: Upload Puerts Plugins default
#id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./puerts_v8_84.tgz
asset_name: puerts_v8_84.tgz
asset_content_type: application/tgz
- name: Upload Puerts Plugins with v8 9.4.146.24
#id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./puerts_v8_94.tgz
asset_name: puerts_v8_94.tgz
asset_content_type: application/tgz
- name: Upload Puerts Plugins UE424 Or Below
#id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./puerts_v8_for_ue424_or_below.tgz
asset_name: puerts_v8_for_ue424_or_below.tgz
asset_content_type: application/tgz
- name: Upload Puerts Plugins With Quickjs Backend
#id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./puerts_quickjs.tgz
asset_name: puerts_quickjs.tgz
asset_content_type: application/tgz
- name: Upload Puerts Plugins With Nodejs Backend
#id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./puerts_nodejs.tgz
asset_name: puerts_nodejs.tgz
asset_content_type: application/tgz