-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (45 loc) · 1.52 KB
/
cd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Continuous Delivery (Release)
on:
workflow_dispatch:
inputs:
project:
description: 'Project to release'
required: true
default: 'pytest-itde'
type: choice
options:
- "pytest-saas"
- "pytest-itde"
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 Development Environment
uses: ./.github/actions/pytest-plugins-environment
- name:
run: |
TAG="${{ inputs.project }}-${{ inputs.version }}"
echo just release ${{ inputs.project }} ${{ inputs.version }}
echo gh release create ${TAG} \
--title ${TAG} \
--notes-file ./${{ inputs.project }}/doc/changes/changes_${{ inputs.version }}.md \
--latest --target main \
dist/*
env:
POETRY_HTTP_BASIC_PYPI_USERNAME: "__token__"
POETRY_HTTP_BASIC_PYPI_PASSWORD: "${{ secrets.PYPI_TOKEN }}"