forked from akretion/python-cfonb
-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (40 loc) · 1.44 KB
/
release.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
name: release
on:
workflow_dispatch:
inputs:
release_version:
description: 'Version number for new release'
required: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.9 ]
steps:
- uses: actions/checkout@v2
- name: set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: install dependencies
run: |
python -m pip install --upgrade pip
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build sdist bdist_wheel
run: |
VERSION=${{ github.event.inputs.release_version }}
sed -i "s/version='.*'/version='$VERSION'/g" setup.py
git config user.name ${{ github.actor }}
git commit . -m "Bump version to ${VERSION}"
git push origin master
git tag $VERSION
git push origin $VERSION
python setup.py sdist bdist_wheel
- name: deploy on pypi
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}