Skip to content

Commit f9334b2

Browse files
committed
CI Update test
1 parent 852a30d commit f9334b2

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
ARTIFACT_NAME: "openapi.yaml"
2424
INPUT: ${{ github.event_name == 'repository_dispatch' && toJSON(github.event.client_payload) || inputs.json }}
2525
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') }}
2727
VERSION_POSTPEND: ${{ github.event_name == 'workflow_dispatch' && inputs.version_postfix || '' }}
2828
steps:
2929
- uses: actions/setup-node@v1
@@ -54,11 +54,9 @@ jobs:
5454
- name: Download Specification
5555
run: wget "${SPEC_URL}" '--output-document' "${ARTIFACT_NAME}"
5656

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}"
6260

6361
- name: Generate SDK Client
6462
run: bash ./generate.sh "${ARTIFACT_NAME}" "${vrchat_sdk_version}"
@@ -71,7 +69,7 @@ jobs:
7169
with:
7270
branch: main
7371
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 }}"
7573

7674
- name: Install pypa/build
7775
run: python -m pip install build --user

0 commit comments

Comments
 (0)