mirror of
https://github.com/anomalyco/opencode-sdk-python.git
synced 2026-05-17 04:12:43 +00:00
chore: sync repo
This commit is contained in:
parent
817f1a0816
commit
9b3134a27e
161 changed files with 1 additions and 20065 deletions
98
.github/workflows/ci.yml
vendored
98
.github/workflows/ci.yml
vendored
|
|
@ -1,98 +0,0 @@
|
|||
name: CI
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'generated'
|
||||
- 'codegen/**'
|
||||
- 'integrated/**'
|
||||
- 'stl-preview-head/**'
|
||||
- 'stl-preview-base/**'
|
||||
pull_request:
|
||||
branches-ignore:
|
||||
- 'stl-preview-head/**'
|
||||
- 'stl-preview-base/**'
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
timeout-minutes: 10
|
||||
name: lint
|
||||
runs-on: ${{ github.repository == 'stainless-sdks/opencode-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
|
||||
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rye
|
||||
run: |
|
||||
curl -sSf https://rye.astral.sh/get | bash
|
||||
echo "$HOME/.rye/shims" >> $GITHUB_PATH
|
||||
env:
|
||||
RYE_VERSION: '0.44.0'
|
||||
RYE_INSTALL_OPTION: '--yes'
|
||||
|
||||
- name: Install dependencies
|
||||
run: rye sync --all-features
|
||||
|
||||
- name: Run lints
|
||||
run: ./scripts/lint
|
||||
|
||||
build:
|
||||
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
|
||||
timeout-minutes: 10
|
||||
name: build
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
runs-on: ${{ github.repository == 'stainless-sdks/opencode-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rye
|
||||
run: |
|
||||
curl -sSf https://rye.astral.sh/get | bash
|
||||
echo "$HOME/.rye/shims" >> $GITHUB_PATH
|
||||
env:
|
||||
RYE_VERSION: '0.44.0'
|
||||
RYE_INSTALL_OPTION: '--yes'
|
||||
|
||||
- name: Install dependencies
|
||||
run: rye sync --all-features
|
||||
|
||||
- name: Run build
|
||||
run: rye build
|
||||
|
||||
- name: Get GitHub OIDC Token
|
||||
if: github.repository == 'stainless-sdks/opencode-python'
|
||||
id: github-oidc
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: core.setOutput('github_token', await core.getIDToken());
|
||||
|
||||
- name: Upload tarball
|
||||
if: github.repository == 'stainless-sdks/opencode-python'
|
||||
env:
|
||||
URL: https://pkg.stainless.com/s
|
||||
AUTH: ${{ steps.github-oidc.outputs.github_token }}
|
||||
SHA: ${{ github.sha }}
|
||||
run: ./scripts/utils/upload-artifact.sh
|
||||
|
||||
test:
|
||||
timeout-minutes: 10
|
||||
name: test
|
||||
runs-on: ${{ github.repository == 'stainless-sdks/opencode-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
|
||||
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rye
|
||||
run: |
|
||||
curl -sSf https://rye.astral.sh/get | bash
|
||||
echo "$HOME/.rye/shims" >> $GITHUB_PATH
|
||||
env:
|
||||
RYE_VERSION: '0.44.0'
|
||||
RYE_INSTALL_OPTION: '--yes'
|
||||
|
||||
- name: Bootstrap
|
||||
run: ./scripts/bootstrap
|
||||
|
||||
- name: Run tests
|
||||
run: ./scripts/test
|
||||
31
.github/workflows/publish-pypi.yml
vendored
31
.github/workflows/publish-pypi.yml
vendored
|
|
@ -1,31 +0,0 @@
|
|||
# This workflow is triggered when a GitHub release is created.
|
||||
# It can also be run manually to re-publish to PyPI in case it failed for some reason.
|
||||
# You can run this workflow by navigating to https://www.github.com/sst/opencode-sdk-python/actions/workflows/publish-pypi.yml
|
||||
name: Publish PyPI
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
name: publish
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rye
|
||||
run: |
|
||||
curl -sSf https://rye.astral.sh/get | bash
|
||||
echo "$HOME/.rye/shims" >> $GITHUB_PATH
|
||||
env:
|
||||
RYE_VERSION: '0.44.0'
|
||||
RYE_INSTALL_OPTION: '--yes'
|
||||
|
||||
- name: Publish to PyPI
|
||||
run: |
|
||||
bash ./bin/publish-pypi
|
||||
env:
|
||||
PYPI_TOKEN: ${{ secrets.OPENCODE_PYPI_TOKEN || secrets.PYPI_TOKEN }}
|
||||
21
.github/workflows/release-doctor.yml
vendored
21
.github/workflows/release-doctor.yml
vendored
|
|
@ -1,21 +0,0 @@
|
|||
name: Release Doctor
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
release_doctor:
|
||||
name: release doctor
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'sst/opencode-sdk-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Check release environment
|
||||
run: |
|
||||
bash ./bin/check-release-environment
|
||||
env:
|
||||
PYPI_TOKEN: ${{ secrets.OPENCODE_PYPI_TOKEN || secrets.PYPI_TOKEN }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue