mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-06 14:45:06 +08:00
38043d3073
Bumps [thedoctor0/zip-release](https://github.com/thedoctor0/zip-release) from 0.6.2 to 0.7.1.
- [Release notes](https://github.com/thedoctor0/zip-release/releases)
- [Commits](09336613be...a24011d8d4
)
---
updated-dependencies:
- dependency-name: thedoctor0/zip-release
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
82 lines
2.7 KiB
YAML
82 lines
2.7 KiB
YAML
name: Build Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
tags:
|
|
- '**'
|
|
|
|
env:
|
|
packageName: "nadena.dev.modular-avatar"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Checkout logo assets
|
|
uses: actions/checkout@v3
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
repository: bdunderscore/modular-avatar-images
|
|
path: image-assets
|
|
- name: Inject logo assets
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
run: |
|
|
cp -f image-assets/img/logo/ma_logo.png Packages/${{env.packageName}}/Editor/Images/logo.png
|
|
cp -f image-assets/img/logo/ma_icon.png Packages/${{env.packageName}}/Runtime/Icons/Icon_MA_Script.png
|
|
|
|
- name: get version
|
|
id: version
|
|
uses: notiz-dev/github-action-json-property@7c8cf5cc36eb85d8d287a8086a39dac59628eb31
|
|
with:
|
|
path: "Packages/${{env.packageName}}/package.json"
|
|
prop_path: "version"
|
|
|
|
- name: Check tag consistency
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
run: |
|
|
if [ "${{ steps.version.outputs.prop }}" != "${GITHUB_REF##*/}" ]; then
|
|
echo "Version in package.json does not match tag name: ${{ steps.version.outputs.prop }} != ${GITHUB_REF##*/}"
|
|
exit 1
|
|
fi
|
|
|
|
- run: echo ${{steps.version.outputs.prop}}
|
|
|
|
- name: Set Environment Variables
|
|
run: |
|
|
echo "zipFile=${{ env.packageName }}-${{ steps.version.outputs.prop }}".zip >> $GITHUB_ENV
|
|
echo "unityPackage=${{ env.packageName }}-${{ steps.version.outputs.prop }}.unitypackage" >> $GITHUB_ENV
|
|
|
|
- name: Create Zip
|
|
uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464
|
|
with:
|
|
type: "zip"
|
|
directory: "Packages/${{env.packageName}}/"
|
|
filename: "../../${{env.zipFile}}" # make the zip file two directories up, since we start two directories in above
|
|
|
|
- run: find "Packages/${{env.packageName}}/" -name \*.meta >> metaList
|
|
|
|
- name: Create UnityPackage
|
|
uses: pCYSl5EDgo/create-unitypackage@e28c7a4616b2754c564b0a959a03b3c89b756fdb
|
|
with:
|
|
package-path: ${{ env.unityPackage }}
|
|
include-files: metaList
|
|
|
|
- name: Make Release
|
|
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
draft: true
|
|
generate_release_notes: true
|
|
tag_name: ${{ steps.version.outputs.prop }}
|
|
files: |
|
|
${{ env.zipFile }}
|
|
${{ env.unityPackage }}
|
|
Packages/${{ env.packageName }}/package.json |