Skip to content

Release

Release #63

name: Release
on:
workflow_dispatch:
inputs:
version:
description: "The new version to set"
following_version:
description: "The post (dev) version to set"
dry_run:
description: "Dry Run?"
default: false
type: boolean
defaults:
run:
shell: bash -eux {0}
jobs:
bump-and-tag:
environment: release
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
- uses: mongodb-labs/drivers-github-tools/setup@v2
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/bump-and-tag@v2
with:
version: ${{ inputs.version }}
version_bump_script: ./.github/scripts/bump-version.sh
dry_run: ${{ inputs.dry_run }}
build-dist:
needs: [bump-and-tag]
uses: ./.github/workflows/dist.yml
static-scan:
needs: [bump-and-tag]
uses: ./.github/workflows/codeql.yml
with:
ref: ${{ inputs.version }}
publish-and-bump:
needs: [build-dist, static-scan]
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
contents: write
security-events: write
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
- uses: mongodb-labs/drivers-github-tools/setup@v2
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/publish@v2
with:
version: ${{ inputs.version }}
following_version: ${{ inputs.following_version }}
version_bump_script: ./.github/scripts/bump-version.sh
product_name: winkerberos
token: ${{ github.token }}
dry_run: ${{ inputs.dry_run }}