Skip to content

Build Release

Build Release #23

Workflow file for this run

name: Build Release
on:
push:
paths:
- "Packages/**"
pull_request:
paths:
- "Packages/**"
create:
ref_type: tag
workflow_dispatch:
env:
packageName: "com.chocopoi.vrc.dressingframework"
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: get version
id: version
uses: notiz-dev/github-action-json-property@7c8cf5cc36eb85d8d287a8086a39dac59628eb31
with:
path: "package.json"
prop_path: "version"
- 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@09336613be18a8208dfa66bd57efafd9e2685657
with:
type: "zip"
exclusions: '*.git* .editorconfig'
filename: "${{env.zipFile}}"
# TODO: we can't use this because DressingFramework lives in the root, not Packages
# - run: find "." -name \*.meta >> metaList
# - name: Create UnityPackage
# uses: pCYSl5EDgo/create-unitypackage@cfcd3cf0391a5ef1306342794866a9897c32af0b
# with:
# package-path: ${{ env.unityPackage }}
# include-files: metaList
# upload artifact
- uses: actions/upload-artifact@v3
with:
name: DK-${{ steps.version.outputs.prop }}
path: |
${{ env.zipFile }}
Packages/${{ env.packageName }}/package.json
- name: Make Release
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5
if: ${{ github.ref_type == 'tag' }}
with:
tag_name: ${{ steps.version.outputs.prop }}
# ${{ env.unityPackage }}
files: |
${{ env.zipFile }}
package.json