Skip to content

Commit 7ccd216

Browse files
committed
Updated workflow file - Now we have bleading edging prerelease and automatical release creation on version tag
1 parent 33de6d3 commit 7ccd216

File tree

2 files changed

+76
-64
lines changed

2 files changed

+76
-64
lines changed

.github/workflows/ci.yaml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Continuous Integration
22

33
on:
4+
push:
5+
branches: [ $default-branch ]
46
pull_request:
57
paths:
68
- '**.py'
@@ -34,3 +36,77 @@ jobs:
3436
run: poetry run python setup_binary.py download_pandoc
3537
- name: run tests
3638
run: poetry run python tests.py
39+
40+
builder:
41+
needs: [test]
42+
strategy:
43+
matrix:
44+
os: [macos-10.15, windows-2019]
45+
runs-on: ${{ matrix.os }}
46+
steps:
47+
- name: Check out repository
48+
uses: actions/checkout@v2
49+
- name: Discover python architecture
50+
run: |
51+
if [ "$RUNNER_OS" == "Windows" ]; then
52+
echo "PYTHON_ARCHITECTURE=x86" >> $GITHUB_ENV
53+
else
54+
echo "PYTHON_ARCHITECTURE=x64" >> $GITHUB_ENV
55+
fi
56+
- name: Set up python
57+
uses: actions/setup-python@v3
58+
with:
59+
python-version: "3.9.x"
60+
architecture: "${{ env.PYTHON_ARCHITECTURE }}"
61+
- name: Print Python Information
62+
run: python -VV
63+
- name: Update dependencies
64+
run: python -m pip install -U pip wheel setuptools twine
65+
- name: Build universal source Archive and wheel
66+
run: python setup.py sdist bdist_wheel
67+
- name: Build binary Archive
68+
run: python setup_binary.py download_pandoc bdist_wheel
69+
- name: Upload artifacts
70+
uses: actions/upload-artifact@v3
71+
with:
72+
name: python-package-distributions
73+
path: dist/
74+
75+
publisher_release:
76+
needs: [builder]
77+
if: startsWith(github.event.ref, 'refs/tags/v')
78+
runs-on: ubuntu-latest
79+
steps:
80+
- name: Check out repository
81+
uses: actions/checkout@v3
82+
- name: Download artifacts
83+
uses: actions/download-artifact@v3
84+
with:
85+
name: python-package-distributions
86+
path: dist/
87+
- name: Publish to PyPI
88+
uses: pypa/gh-action-pypi-publish@release/v1
89+
with:
90+
verbose: true
91+
user: __token__
92+
password: ${{ secrets.PYPI_API_TOKEN }}
93+
94+
publisher_latest:
95+
needs: [builder]
96+
runs-on: ubuntu-latest
97+
steps:
98+
- name: Check out repository
99+
uses: actions/checkout@v3
100+
- name: Download artifacts
101+
uses: actions/download-artifact@v3
102+
with:
103+
name: python-package-distributions
104+
path: dist/
105+
- name: Make release
106+
uses: "marvinpinto/action-automatic-releases@v1.2.1"
107+
with:
108+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
109+
prerelease: true
110+
title: "Latest Development Version"
111+
automatic_release_tag: "latest"
112+
files: dist/*

.github/workflows/continuous-deployment.yaml

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)