-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (34 loc) · 1.09 KB
/
cd.yml
File metadata and controls
37 lines (34 loc) · 1.09 KB
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
name: CD
on:
workflow_dispatch:
inputs:
release_version:
description: 'Version number for new release'
required: true
jobs:
CD:
timeout-minutes: 15
runs-on: ubuntu-latest
env:
VERSION: ${{ github.event.inputs.release_version }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: version
run: sed -i "s/__version__ = '.*'/__version__ = '$VERSION'/g" aiocli/__init__.py
- name: deps
run: python3 -m pip install .[dev,deploy]
- name: deploy
env:
TWINE_USERNAME: ${{ secrets.POETRY_HTTP_BASIC_PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.POETRY_HTTP_BASIC_PYPI_PASSWORD }}
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
git commit . -m "release: v${VERSION}"
git push origin main
git tag $VERSION
git push origin $VERSION
python3 run-script deploy