forked from luisiturrios1/python-cfdiclient
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (50 loc) · 1.53 KB
/
continuous_deployment.yml
File metadata and controls
58 lines (50 loc) · 1.53 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Continuous Deployment
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- v[0-9]+.[0-9]+.* # add .* to allow dev releases
jobs:
deploy:
name: pipenv PyPI Upload
runs-on: ubuntu-latest
env:
CI: "1"
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade --upgrade-strategy=eager pip pipenv setuptools wheel twine
python -m pip install .
python -m pipenv install --dev
env:
PIPENV_DEFAULT_PYTHON_VERSION: "3.9"
- name: Build wheels
run: |
python -m pipenv run python setup.py sdist bdist_wheel
# to upload to test pypi, pass repository_url: https://test.pypi.org/legacy/ and use secrets.TEST_PYPI_TOKEN
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
packages_dir: dist/
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}