Skip to content

Commit d11fa41

Browse files
committed
Another try
1 parent f9334b2 commit d11fa41

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 12 additions & 4 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: ${{ replace((github.event_name == 'repository_dispatch' && github.event.client_payload || fromJSON(inputs.json))['version'], '-nightly.', '.dev') }}
26+
PASSED_VERSION: ${{ (github.event_name == 'repository_dispatch' && github.event.client_payload || fromJSON(inputs.json))['version'] }}
2727
VERSION_POSTPEND: ${{ github.event_name == 'workflow_dispatch' && inputs.version_postfix || '' }}
2828
steps:
2929
- uses: actions/setup-node@v1
@@ -54,12 +54,20 @@ jobs:
5454
- name: Download Specification
5555
run: wget "${SPEC_URL}" '--output-document' "${ARTIFACT_NAME}"
5656

57+
- name: Set version
58+
id: version
59+
run: |
60+
# Replace using bash
61+
VERSION="${PASSED_VERSION}${VERSION_POSTPEND}"
62+
CLEAN_VERSION="${VERSION/-nightly./.dev}"
63+
echo "version=${CLEAN_VERSION}" >> $GITHUB_OUTPUT
64+
5765
- name: Apply Version Postpend
5866
if: ${{ github.event_name == 'workflow_dispatch' && inputs.version_postfix != '' }}
59-
run: yq '--inplace' ".info.version |= \"${PASSED_VERSION}${VERSION_POSTPEND}\"" "${ARTIFACT_NAME}"
67+
run: yq '--inplace' ".info.version |= \"${{ steps.version.outputs.version }}\"" "${ARTIFACT_NAME}"
6068

6169
- name: Generate SDK Client
62-
run: bash ./generate.sh "${ARTIFACT_NAME}" "${vrchat_sdk_version}"
70+
run: bash ./generate.sh "${ARTIFACT_NAME}" "${{ steps.version.outputs.version }}"
6371

6472
- name: Delete openapi.yaml file
6573
run: unlink ${ARTIFACT_NAME}
@@ -69,7 +77,7 @@ jobs:
6977
with:
7078
branch: main
7179
folder: .
72-
commit-message: "Upgrade Python SDK to spec ${{ env.PASSED_VERSION }}${{ env.VERSION_POSTPEND }}"
80+
commit-message: "Upgrade Python SDK to spec ${{ steps.version.outputs.version }}"
7381

7482
- name: Install pypa/build
7583
run: python -m pip install build --user

0 commit comments

Comments
 (0)