mirror of
https://github.com/cloudflare/cloudflare-python.git
synced 2026-01-16 23:01:03 +00:00
feat: update via SDK Studio (#1)
This commit is contained in:
parent
7fc6819f1f
commit
fb31f8524f
8 changed files with 141 additions and 1 deletions
31
.github/workflows/publish-pypi.yml
vendored
Normal file
31
.github/workflows/publish-pypi.yml
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# 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/cloudflare/cloudflare-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@v3
|
||||
|
||||
- name: Install Rye
|
||||
run: |
|
||||
curl -sSf https://rye-up.com/get | bash
|
||||
echo "$HOME/.rye/shims" >> $GITHUB_PATH
|
||||
env:
|
||||
RYE_VERSION: 0.15.2
|
||||
RYE_INSTALL_OPTION: "--yes"
|
||||
|
||||
- name: Publish to PyPI
|
||||
run: |
|
||||
bash ./bin/publish-pypi
|
||||
env:
|
||||
PYPI_TOKEN: ${{ secrets.CLOUDFLARE_PYPI_TOKEN || secrets.PYPI_TOKEN }}
|
||||
19
.github/workflows/release-doctor.yml
vendored
Normal file
19
.github/workflows/release-doctor.yml
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
name: Release Doctor
|
||||
on:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
release_doctor:
|
||||
name: release doctor
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'cloudflare/cloudflare-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Check release environment
|
||||
run: |
|
||||
bash ./bin/check-release-environment
|
||||
env:
|
||||
PYPI_TOKEN: ${{ secrets.CLOUDFLARE_PYPI_TOKEN || secrets.PYPI_TOKEN }}
|
||||
3
.release-please-manifest.json
Normal file
3
.release-please-manifest.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
".": "0.0.1"
|
||||
}
|
||||
21
bin/check-release-environment
Normal file
21
bin/check-release-environment
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
errors=()
|
||||
|
||||
if [ -z "${PYPI_TOKEN}" ]; then
|
||||
errors+=("The CLOUDFLARE_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
|
||||
fi
|
||||
|
||||
len=${#errors[@]}
|
||||
|
||||
if [[ len -gt 0 ]]; then
|
||||
echo -e "Found the following errors in the release environment:\n"
|
||||
|
||||
for error in "${errors[@]}"; do
|
||||
echo -e "- $error\n"
|
||||
done
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "The environment is ready to push releases!"
|
||||
0
bin/check-test-server
Normal file → Executable file
0
bin/check-test-server
Normal file → Executable file
0
bin/test
Normal file → Executable file
0
bin/test
Normal file → Executable file
66
release-please-config.json
Normal file
66
release-please-config.json
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
"packages": {
|
||||
".": {}
|
||||
},
|
||||
"$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json",
|
||||
"include-v-in-tag": true,
|
||||
"include-component-in-tag": false,
|
||||
"versioning": "prerelease",
|
||||
"prerelease": true,
|
||||
"bump-minor-pre-major": true,
|
||||
"bump-patch-for-minor-pre-major": false,
|
||||
"pull-request-header": "Automated Release PR",
|
||||
"pull-request-title-pattern": "release: ${version}",
|
||||
"changelog-sections": [
|
||||
{
|
||||
"type": "feat",
|
||||
"section": "Features"
|
||||
},
|
||||
{
|
||||
"type": "fix",
|
||||
"section": "Bug Fixes"
|
||||
},
|
||||
{
|
||||
"type": "perf",
|
||||
"section": "Performance Improvements"
|
||||
},
|
||||
{
|
||||
"type": "revert",
|
||||
"section": "Reverts"
|
||||
},
|
||||
{
|
||||
"type": "chore",
|
||||
"section": "Chores"
|
||||
},
|
||||
{
|
||||
"type": "docs",
|
||||
"section": "Documentation"
|
||||
},
|
||||
{
|
||||
"type": "style",
|
||||
"section": "Styles"
|
||||
},
|
||||
{
|
||||
"type": "refactor",
|
||||
"section": "Refactors"
|
||||
},
|
||||
{
|
||||
"type": "test",
|
||||
"section": "Tests",
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"type": "build",
|
||||
"section": "Build System"
|
||||
},
|
||||
{
|
||||
"type": "ci",
|
||||
"section": "Continuous Integration",
|
||||
"hidden": true
|
||||
}
|
||||
],
|
||||
"release-type": "python",
|
||||
"extra-files": [
|
||||
"src/cloudflare/_version.py"
|
||||
]
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# File generated from our OpenAPI spec by Stainless.
|
||||
|
||||
__title__ = "cloudflare"
|
||||
__version__ = "0.0.1"
|
||||
__version__ = "0.0.1" # x-release-please-version
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue