ci: report how to install what this run built #145
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| push: | |
| branches: | |
| - '**' | |
| pull_request: | |
| workflow_call: | |
| inputs: | |
| ref: | |
| description: Ref of this repository to build. | |
| required: false | |
| type: string | |
| default: main | |
| outputs: | |
| install: | |
| description: How to get what this run built. | |
| value: ${{ jobs.build.outputs.install }} | |
| name: CI | |
| jobs: | |
| generate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| repository: vrchatapi/vrchatapi-python | |
| ref: ${{ inputs.ref || github.ref }} | |
| - uses: vrchatapi/specification/.github/actions/setup-generator@ci/modernise-actions | |
| - uses: vrchatapi/specification/.github/actions/download@ci/modernise-actions | |
| with: | |
| bundle: openapi-legacy.yaml | |
| - run: bash ./generate.sh openapi-legacy.yaml "$(yq -r '.info.version' openapi-legacy.yaml)" | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: generated-python | |
| path: . | |
| include-hidden-files: true | |
| build: | |
| needs: generate | |
| runs-on: ubuntu-latest | |
| outputs: | |
| install: "[download](${{ steps.upload.outputs.artifact-url }})" | |
| steps: | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: generated-python | |
| - uses: actions/setup-python@v7 | |
| with: | |
| python-version: '3.14' | |
| cache: pip | |
| - run: python -m pip install build | |
| - run: python -m build | |
| - id: upload | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: dist-python | |
| path: dist | |
| install: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: dist-python | |
| path: dist | |
| - uses: actions/setup-python@v7 | |
| with: | |
| python-version: '3.14' | |
| - run: python -m pip install dist/*.whl | |
| - run: python -c "import vrchatapi; print(vrchatapi.__name__)" |