Skip to content

Continuous Delivery (Release) #72

Continuous Delivery (Release)

Continuous Delivery (Release) #72

Workflow file for this run

name: Continuous Delivery (Release)
on:
workflow_dispatch:
inputs:
project:
description: 'Project to release'
required: true
default: 'pytest-backend'
type: choice
options:
- "pytest-backend"
- "pytest-extension"
- "pytest-slc"
version:
description: 'Version number for the release'
required: true
type: string
jobs:
check-release-branch:
name: Check branch for release ${{ inputs.project }}
runs-on: ubuntu-24.04
permissions:
contents: write
defaults:
run:
working-directory: ${{ inputs.project }}
steps:
- name: Fail if not running on main branch
if: ${{ github.ref != 'refs/heads/main' }}
uses: actions/github-script@v7
with:
script: |
core.setFailed('Not running on main branch, github.ref is ${{ github.ref }}. Please start this workflow only on main')
check-tag-version-job:
name: Check Release Tag
uses: ./.github/workflows/check-release-tag.yml
permissions:
contents: read
with:
working-directory: ${{ inputs.project }}
version: ${{ inputs.version }}
cd-job:
needs: [ check-release-branch, check-tag-version-job ]
name: Continuous Delivery
uses: ./.github/workflows/build-and-publish.yml
permissions:
contents: write
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
with:
working-directory: ${{ inputs.project }}
version: ${{ inputs.version }}