mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-02-21 05:35:04 +08:00
wip
This commit is contained in:
parent
47fd6ac04b
commit
bb8eb3152d
18
.github/workflows/build-docs.yml
vendored
18
.github/workflows/build-docs.yml
vendored
@ -1,18 +0,0 @@
|
||||
name: Build documentation
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- test
|
||||
|
||||
jobs:
|
||||
build_docs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Docusaurus BuildDeploy Action
|
||||
uses: redkubes/docusaurus-deploy-action@v1.2
|
||||
with:
|
||||
source-folder: docs
|
||||
git-user: docusaurus
|
||||
git-password: ${{ secrets.GITHUB_TOKEN }}
|
||||
deployment-branch: gh-pages
|
70
.github/workflows/build-pages.yml
vendored
Normal file
70
.github/workflows/build-pages.yml
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
name: Build documentation
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- test
|
||||
|
||||
env:
|
||||
listPublishDirectory: docs/build
|
||||
vpmSubDirectory: vpm
|
||||
pathToCi: ci
|
||||
|
||||
jobs:
|
||||
build-listing:
|
||||
name: build-listing
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
- uses: actions/checkout@v3 # check out this repo
|
||||
- uses: actions/checkout@v3 # check out automation repo
|
||||
with:
|
||||
repository: vrchat-community/package-list-action
|
||||
path: ${{env.pathToCi}}
|
||||
clean: false # otherwise the local repo will no longer be checked out
|
||||
|
||||
- name: Build docs
|
||||
run: |
|
||||
cd docs
|
||||
npm install
|
||||
npm build
|
||||
|
||||
- name: Restore Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
${{env.pathToCi}}/.nuke/temp
|
||||
~/.nuget/packages
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
|
||||
|
||||
- name: Build Package Version Listing
|
||||
run: ${{env.pathToCi}}/build.cmd BuildRepoListing --root ${{env.pathToCi}} --list-publish-directory $GITHUB_WORKSPACE/${{env.listPublishDirectory}}/${{env.vpmSubDirectory}}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v2
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v1
|
||||
with:
|
||||
path: ${{env.listPublishDirectory}}
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v1
|
||||
build_docs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Docusaurus BuildDeploy Action
|
||||
uses: redkubes/docusaurus-deploy-action@v1.2
|
||||
with:
|
||||
source-folder: docs
|
||||
git-user: docusaurus
|
||||
git-password: ${{ secrets.GITHUB_TOKEN }}
|
||||
deployment-branch: gh-pages
|
123
.github/workflows/build-release.yml
vendored
123
.github/workflows/build-release.yml
vendored
@ -1,86 +1,57 @@
|
||||
name: Build release artifacts
|
||||
name: Build Release
|
||||
|
||||
on: push
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: main
|
||||
paths: Packages/net.fushizen.modular-avatar/**
|
||||
|
||||
env:
|
||||
packageName: "net.fushizen.modular-avatar"
|
||||
|
||||
jobs:
|
||||
build-unitypackage:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Misc setup
|
||||
run: |
|
||||
cp COPYING.md Assets/bd_/ModularAvatar/COPYING.txt
|
||||
cp COPYING.md Packages/net.fushizen.modular-avatar/COPYING.txt
|
||||
mkdir output
|
||||
cp COPYING.md output/COPYING.txt
|
||||
- name: Generate VPM package
|
||||
run: |
|
||||
cd Packages/net.fushizen.modular-avatar && zip ../../output/ModularAvatar.vpm.zip -r .
|
||||
- name: Generate filelists
|
||||
run: |
|
||||
find Packages/net.fushizen.modular-avatar -name '*.meta' >> metaList
|
||||
|
||||
cat metaList
|
||||
- name: Build unitypackage
|
||||
uses: pCYSl5EDgo/create-unitypackage@2f4ac82dabd3a1029f7a6771f30dc796e4217551
|
||||
with:
|
||||
package-path: 'output/modular-avatar-dev.unitypackage'
|
||||
include-files: metaList
|
||||
- name: Upload commit artifacts (dev .zip package)
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
path: output
|
||||
name: modular-avatar-dev
|
||||
- name: Set version based on tag
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: get version
|
||||
id: version
|
||||
if: startsWith(github.event.ref, 'refs/tags/')
|
||||
uses: notiz-dev/github-action-json-property@7c8cf5cc36eb85d8d287a8086a39dac59628eb31
|
||||
with:
|
||||
path: "Packages/${{env.packageName}}/package.json"
|
||||
prop_path: "version"
|
||||
|
||||
- run: echo ${{steps.version.outputs.prop}}
|
||||
|
||||
- name: Set Environment Variables
|
||||
run: |
|
||||
echo ::set-output name=version::${GITHUB_REF/refs\/tags\//}
|
||||
- name: Rename and zip artifacts
|
||||
if: startsWith(github.event.ref, 'refs/tags/')
|
||||
run: |
|
||||
mv output/modular-avatar-dev.unitypackage output/modular-avatar-${{ steps.version.outputs.version }}.unitypackage
|
||||
mv output/ModularAvatar.vpm.zip output/modular-avatar-${{ steps.version.outputs.version }}.vpm.zip
|
||||
(cd output; zip ../modular-avatar-dev.zip *)
|
||||
- name: Create draft release
|
||||
if: startsWith(github.event.ref, 'refs/tags/')
|
||||
uses: actions/create-release@v1
|
||||
id: create_release
|
||||
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:
|
||||
draft: true
|
||||
prerelease: false
|
||||
release_name: ${{ steps.version.outputs.version }}
|
||||
tag_name: ${{ github.ref }}
|
||||
body_path: CHANGELOG.md
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
- name: Upload VPM release artifact
|
||||
if: startsWith(github.event.ref, 'refs/tags/')
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
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:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: output/modular-avatar-${{ steps.version.outputs.version }}.vpm.zip
|
||||
asset_name: modular-avatar-${{ steps.version.outputs.version }}.vpm.zip
|
||||
asset_content_type: application/octet-stream
|
||||
- name: Upload unitypackage release artifact
|
||||
if: startsWith(github.event.ref, 'refs/tags/')
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
package-path: ${{ env.unityPackage }}
|
||||
include-files: metaList
|
||||
|
||||
|
||||
- name: Make Release
|
||||
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: output/modular-avatar-${{ steps.version.outputs.version }}.unitypackage
|
||||
asset_name: modular-avatar-${{ steps.version.outputs.version }}.unitypackage
|
||||
asset_content_type: application/octet-stream
|
||||
- name: Upload zip release artifact
|
||||
if: startsWith(github.event.ref, 'refs/tags/')
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: modular-avatar-dev.zip
|
||||
asset_name: avrc-${{ steps.version.outputs.version }}.zip
|
||||
asset_content_type: application/zip
|
||||
tag_name: ${{ steps.version.outputs.prop }}
|
||||
files: |
|
||||
${{ env.zipFile }}
|
||||
${{ env.unityPackage }}
|
||||
Packages/${{ env.packageName }}/package.json
|
Loading…
Reference in New Issue
Block a user