Continuous Delivery (Release) #72
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} |