Skip to content

Continuous Delivery (Release) #22

Continuous Delivery (Release)

Continuous Delivery (Release) #22

Workflow file for this run

name: Continuous Delivery (Release)
on:
workflow_dispatch:
inputs:
project:
description: 'Project to release'
required: true
default: 'pytest-itde'
type: choice
options:
- "pytest-itde"
- "pytest-saas"
version:
description: 'Version number for the release'
required: True
type: int
jobs:
Release:
runs-on: ubuntu-20.04
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')
- name: Check
run: |
echo "Stub: validate that all preconditions for the release are met"
- name: SCM Checkout
uses: actions/checkout@v4
- name: Setup Python & Poetry Environment
uses: exasol/python-toolbox/.github/actions/python-environment@0.9.0
- name:
run: |
TAG="${{ inputs.project }}-${{ inputs.version }}"
echo just release ${{ inputs.project }} ${{ inputs.version }}
echo gh release create ${GITHUB_REF_NAME} \
--title ${GITHUB_REF_NAME} \
--notes-file ./${PROJECT}/doc/changes/changes_${VERSION}.md \
--latest --target main \
dist/*
env:
POETRY_HTTP_BASIC_PYPI_USERNAME: "__token__"
POETRY_HTTP_BASIC_PYPI_PASSWORD: "${{ secrets.PYPI_TOKEN }}"