Merge pull request #271 from onerain88/feat/npm-release #63
Workflow file for this run
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
name: .NET | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 5.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: | | |
dotnet clean --configuration Release | |
dotnet build --configuration Release | |
# 打包库 | |
- run: bash ./script/package.sh | |
# 打包 Unity 推送插件 | |
# 打包不包含 Gradle 配置的插件 | |
- run: | | |
cd ./Push/Push.Unity | |
echo "Assets/LeanCloud.meta" > metaList | |
find ./Assets/LeanCloud/ -name \*.meta >> metaList | |
- uses: pCYSl5EDgo/create-unitypackage@master | |
with: | |
project-folder: ./Push/Push.Unity | |
package-path: 'release/unity-push-without-gradle.unitypackage' | |
include-files: ./Push/Push.Unity/metaList | |
# 打包包含 Gradle 配置的插件 | |
- run: | | |
cd ./Push/Push.Unity | |
echo "Assets/Plugins.meta" >> metaList | |
echo "Assets/Plugins/Android.meta" >> metaList | |
find Assets/Plugins/Android/ -name \*.meta >> metaList | |
- uses: pCYSl5EDgo/create-unitypackage@master | |
with: | |
project-folder: ./Push/Push.Unity | |
package-path: 'release/unity-push.unitypackage' | |
include-files: ./Push/Push.Unity/metaList | |
# 发布到 Releases | |
- name: Release | |
uses: fnkr/github-action-ghr@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
GHR_PATH: release/ | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# 生成 API 文档 | |
- name: Doc | |
uses: mattnotmitt/doxygen-action@v1 | |
# 发布 API 文档 | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./Doc |