Bumps the actions group with 6 updates in the / directory: | Package | From | To | | --- | --- | --- | | [github/codeql-action](https://github.com/github/codeql-action) | `4.31.9` | `4.35.2` | | [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) | `1.13.0` | `1.14.0` | | [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) | `8.1.0` | `8.1.1` | | [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) | `7.6.0` | `8.1.0` | | [codecov/codecov-action](https://github.com/codecov/codecov-action) | `5.5.2` | `6.0.0` | | [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action) | `0.5.2` | `0.5.3` | Updates `github/codeql-action` from 4.31.9 to 4.35.2 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](5d4e8d1aca...95e58e9a2c) Updates `pypa/gh-action-pypi-publish` from 1.13.0 to 1.14.0 - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](ed0c53931b...cef221092e) Updates `peter-evans/create-pull-request` from 8.1.0 to 8.1.1 - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](c0f553fe54...5f6978faf0) Updates `astral-sh/setup-uv` from 7.6.0 to 8.1.0 - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](37802adc94...08807647e7) Updates `codecov/codecov-action` from 5.5.2 to 6.0.0 - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](671740ac38...57e3a136b7) Updates `zizmorcore/zizmor-action` from 0.5.2 to 0.5.3 - [Release notes](https://github.com/zizmorcore/zizmor-action/releases) - [Commits](71321a20a9...b1d7e1fb5d) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.35.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: pypa/gh-action-pypi-publish dependency-version: 1.14.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: peter-evans/create-pull-request dependency-version: 8.1.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: astral-sh/setup-uv dependency-version: 8.1.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: codecov/codecov-action dependency-version: 6.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: zizmorcore/zizmor-action dependency-version: 0.5.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com>
118 lines
3.5 KiB
YAML
118 lines
3.5 KiB
YAML
name: Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
following_version:
|
|
description: "The post (dev) version to set"
|
|
dry_run:
|
|
description: "Dry Run?"
|
|
default: false
|
|
type: boolean
|
|
schedule:
|
|
- cron: '30 5 * * *'
|
|
|
|
env:
|
|
# Changes per repo
|
|
PRODUCT_NAME: PyMongo
|
|
# Changes per branch
|
|
EVERGREEN_PROJECT: mongo-python-driver
|
|
# Constant
|
|
# inputs will be empty on a scheduled run. so, we only set dry_run
|
|
# to 'false' when the input is set to 'false'.
|
|
DRY_RUN: ${{ ! contains(inputs.dry_run, 'false') }}
|
|
FOLLOWING_VERSION: ${{ inputs.following_version || '' }}
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash -eux {0}
|
|
|
|
jobs:
|
|
pre-publish:
|
|
environment: release
|
|
runs-on: ubuntu-latest
|
|
if: github.repository_owner == 'mongodb' || github.event_name == 'workflow_dispatch'
|
|
permissions:
|
|
id-token: write
|
|
contents: write
|
|
outputs:
|
|
version: ${{ steps.pre-publish.outputs.version }}
|
|
steps:
|
|
- uses: mongodb-labs/drivers-github-tools/secure-checkout@v3
|
|
with:
|
|
app_id: ${{ vars.APP_ID }}
|
|
private_key: ${{ secrets.APP_PRIVATE_KEY }}
|
|
- uses: mongodb-labs/drivers-github-tools/setup@v3
|
|
with:
|
|
aws_role_arn: ${{ secrets.AWS_ROLE_ARN }}
|
|
aws_region_name: ${{ vars.AWS_REGION_NAME }}
|
|
aws_secret_id: ${{ secrets.AWS_SECRET_ID }}
|
|
- uses: mongodb-labs/drivers-github-tools/python/pre-publish@v3
|
|
id: pre-publish
|
|
with:
|
|
dry_run: ${{ env.DRY_RUN }}
|
|
|
|
build-dist:
|
|
needs: [pre-publish]
|
|
uses: ./.github/workflows/dist.yml
|
|
with:
|
|
ref: ${{ needs.pre-publish.outputs.version }}
|
|
|
|
static-scan:
|
|
needs: [pre-publish]
|
|
uses: ./.github/workflows/codeql.yml
|
|
permissions:
|
|
security-events: write
|
|
with:
|
|
ref: ${{ needs.pre-publish.outputs.version }}
|
|
|
|
publish:
|
|
needs: [build-dist, static-scan]
|
|
name: Upload release to PyPI
|
|
runs-on: ubuntu-latest
|
|
environment: release
|
|
permissions:
|
|
id-token: write
|
|
steps:
|
|
- name: Download all the dists
|
|
uses: actions/download-artifact@v8
|
|
with:
|
|
name: all-dist-${{ github.run_id }}
|
|
path: dist/
|
|
- name: Publish package distributions to TestPyPI
|
|
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
|
|
with:
|
|
repository-url: https://test.pypi.org/legacy/
|
|
skip-existing: true
|
|
attestations: ${{ env.DRY_RUN }}
|
|
- name: Publish package distributions to PyPI
|
|
if: startsWith(env.DRY_RUN, 'false')
|
|
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
|
|
|
|
post-publish:
|
|
needs: [publish]
|
|
runs-on: ubuntu-latest
|
|
environment: release
|
|
permissions:
|
|
id-token: write
|
|
contents: write
|
|
attestations: write
|
|
security-events: write
|
|
steps:
|
|
- uses: mongodb-labs/drivers-github-tools/secure-checkout@v3
|
|
with:
|
|
app_id: ${{ vars.APP_ID }}
|
|
private_key: ${{ secrets.APP_PRIVATE_KEY }}
|
|
- uses: mongodb-labs/drivers-github-tools/setup@v3
|
|
with:
|
|
aws_role_arn: ${{ secrets.AWS_ROLE_ARN }}
|
|
aws_region_name: ${{ vars.AWS_REGION_NAME }}
|
|
aws_secret_id: ${{ secrets.AWS_SECRET_ID }}
|
|
- uses: mongodb-labs/drivers-github-tools/python/post-publish@v3
|
|
with:
|
|
following_version: ${{ env.FOLLOWING_VERSION }}
|
|
product_name: ${{ env.PRODUCT_NAME }}
|
|
evergreen_project: ${{ env.EVERGREEN_PROJECT }}
|
|
token: ${{ github.token }}
|
|
dry_run: ${{ env.DRY_RUN }}
|