|
23 | 23 | ARTIFACT_NAME: "openapi.yaml" |
24 | 24 | INPUT: ${{ github.event_name == 'repository_dispatch' && toJSON(github.event.client_payload) || inputs.json }} |
25 | 25 | SPEC_URL: ${{ (github.event_name == 'repository_dispatch' && github.event.client_payload || fromJSON(inputs.json))['artifacts']['openapi-legacy.yaml'] }} |
26 | | - PASSED_VERSION: ${{ (github.event_name == 'repository_dispatch' && github.event.client_payload || fromJSON(inputs.json))['version'] }} |
| 26 | + PASSED_VERSION: ${{ replace((github.event_name == 'repository_dispatch' && github.event.client_payload || fromJSON(inputs.json))['version'], '-nightly.', '.dev') }} |
27 | 27 | VERSION_POSTPEND: ${{ github.event_name == 'workflow_dispatch' && inputs.version_postfix || '' }} |
28 | 28 | steps: |
29 | 29 | - uses: actions/setup-node@v1 |
|
54 | 54 | - name: Download Specification |
55 | 55 | run: wget "${SPEC_URL}" '--output-document' "${ARTIFACT_NAME}" |
56 | 56 |
|
57 | | - - name: Check version number |
58 | | - run: | |
59 | | - vrchat_sdk_version=$(( ${PASSED_VERSION%%.*})).${PASSED_VERSION#*.}${VERSION_POSTPEND} |
60 | | - echo "Version is: ${vrchat_sdk_version}" |
61 | | - echo "vrchat_sdk_version=$vrchat_sdk_version" >> $GITHUB_ENV |
| 57 | + - name: Apply Version Postpend |
| 58 | + if: ${{ github.event_name == 'workflow_dispatch' && inputs.version_postfix != '' }} |
| 59 | + run: yq '--inplace' ".info.version |= \"${PASSED_VERSION}${VERSION_POSTPEND}\"" "${ARTIFACT_NAME}" |
62 | 60 |
|
63 | 61 | - name: Generate SDK Client |
64 | 62 | run: bash ./generate.sh "${ARTIFACT_NAME}" "${vrchat_sdk_version}" |
|
71 | 69 | with: |
72 | 70 | branch: main |
73 | 71 | folder: . |
74 | | - commit-message: "Upgrade Python SDK to spec ${vrchat_sdk_version}" |
| 72 | + commit-message: "Upgrade Python SDK to spec ${{ env.PASSED_VERSION }}${{ env.VERSION_POSTPEND }}" |
75 | 73 |
|
76 | 74 | - name: Install pypa/build |
77 | 75 | run: python -m pip install build --user |
|
0 commit comments