mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-04-09 05:58:59 +08:00
Fixing/updating workflows
This commit is contained in:
parent
413303528a
commit
88dd3cffdb
50
.github/workflows/build-pages.yml
vendored
50
.github/workflows/build-pages.yml
vendored
@ -2,13 +2,18 @@ name: Build documentation
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- test
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
listPublishDirectory: docs/build
|
||||
vpmSubDirectory: vpm
|
||||
pathToCi: ci
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-listing:
|
||||
name: build-listing
|
||||
@ -21,30 +26,12 @@ jobs:
|
||||
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 }}
|
||||
npm run build
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v2
|
||||
@ -52,19 +39,8 @@ jobs:
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v1
|
||||
with:
|
||||
path: ${{env.listPublishDirectory}}
|
||||
path: docs/build
|
||||
|
||||
- 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
|
||||
uses: actions/deploy-pages@v1
|
18
.github/workflows/build-release.yml
vendored
18
.github/workflows/build-release.yml
vendored
@ -3,8 +3,10 @@ name: Build Release
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: main
|
||||
paths: Packages/net.fushizen.modular-avatar/**
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- '**'
|
||||
|
||||
env:
|
||||
packageName: "net.fushizen.modular-avatar"
|
||||
@ -23,6 +25,14 @@ jobs:
|
||||
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}}
|
||||
|
||||
@ -46,10 +56,12 @@ jobs:
|
||||
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 }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user