Skip to content

Update CI

Update CI #130

Workflow file for this run

on:

Check failure on line 1 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yaml

Invalid workflow file

(Line: 66, Col: 27): Unrecognized named-value: 'vrchat_sdk_version'. Located at position 1 within expression: vrchat_sdk_version, (Line: 67, Col: 16): Unrecognized named-value: 'vrchat_sdk_version'. Located at position 1 within expression: vrchat_sdk_version
repository_dispatch:
types: [release]
workflow_dispatch:
inputs:
json:
description: 'Passed json from repository_dispatch'
required: true
type: string
version_postfix:
description: 'Additional string to concatenate onto the existing version before release'
required: false
type: string
default: ''
name: Generate VRChat API SDK
jobs:
generate:
runs-on: ubuntu-latest
name: Generate VRChat API SDK
env:
ARTIFACT_NAME: "openapi.yaml"
INPUT: ${{ github.event_name == 'repository_dispatch' && github.event.client_payload || inputs.json }}
SPEC_URL: ${{ fromJSON(github.event_name == 'repository_dispatch' && github.event.client_payload || inputs.json)['artifacts']['openapi-legacy.yaml'] }}
PASSED_VERSION: ${{ fromJSON(github.event_name == 'repository_dispatch' && github.event.client_payload || inputs.json)['version'] }}
VERSION_POSTPEND: ${{ github.event_name == 'workflow_dispatch' && inputs.version_postfix || '' }}
steps:
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/checkout@v3
- name: 'Cache node_modules'
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node-v16-${{ hashFiles('**/generate.sh') }}
restore-keys: |
${{ runner.os }}-node-v16
- name: Install OpenAPI Generator CLI
run: npm install @openapitools/openapi-generator-cli
- name: Set OpenAPI Generator version
run: ./node_modules/\@openapitools/openapi-generator-cli/main.js version-manager set 6.2.1
- name: Download Specification
run: wget "${SPEC_URL}" '--output-document' "${ARTIFACT_NAME}"
- name: Check version number
run: |
vrchat_sdk_version=$(( ${PASSED_VERSION%%.*} + 1)).${PASSED_VERSION#*.}${VERSION_POSTPEND}
echo "Version is: ${vrchat_sdk_version}"
echo "vrchat_sdk_version=$vrchat_sdk_version" >> $GITHUB_ENV
- name: Generate SDK Client
run: bash ./generate.sh "${ARTIFACT_NAME}" "${vrchat_sdk_version}"
- name: Deploy SDK back into main branch and make tag
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: main
folder: .
commit-message: "Upgrade Java SDK to spec ${{vrchat_sdk_version}}"
tag: ${{vrchat_sdk_version}}
# gradle:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Set up JDK 13
# uses: actions/setup-java@v2
# with:
# java-version: '13'
# distribution: 'adopt'
# - name: Validate Gradle wrapper
# uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
# - name: Build with Gradle
# run: chmod ugo+x gradlew; ./gradlew build