Skip to content

spec_release

spec_release #87

Workflow file for this run

on:
repository_dispatch:
types: [spec_release]
#on: push
name: Generate VRChat API SDK
jobs:
generate:
runs-on: ubuntu-latest
name: Generate VRChat API SDK
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: Generate SDK Client
run: bash ./generate.sh
- name: Check version number
run: |
echo "spec_version=$(grep "version =" build.gradle | cut -d "'" -f 2)" >> $GITHUB_ENV
- name: Print version number
run: echo ${{ env.spec_version }}
- name: Deploy SDK back into main branch and make tag
uses: JamesIves/[email protected]
with:
branch: main
folder: .
commit-message: "Upgrade Java SDK to spec ${{ env.spec_version }}"
tag: ${{ env.spec_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