Skip to content

Commit eb479ff

Browse files
andfoyccordoba12
andauthored
Add automatic release workflow (#861)
Co-authored-by: Carlos Cordoba <[email protected]>
1 parent 9bc744d commit eb479ff

File tree

2 files changed

+46
-2
lines changed

2 files changed

+46
-2
lines changed

.github/workflows/release.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: PyLS Release
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
9+
jobs:
10+
build:
11+
name: Linux Py${{ matrix.PYTHON_VERSION }}
12+
runs-on: ubuntu-latest
13+
env:
14+
CI: 'true'
15+
OS: 'linux'
16+
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
PYTHON_VERSION: ['3.8']
21+
timeout-minutes: 10
22+
steps:
23+
- uses: actions/cache@v1
24+
with:
25+
path: ~/.cache/pip
26+
key: ${{ runner.os }}-${{ matrix.PYTHON_VERSION }}-pip-${{ hashFiles('setup.py') }}
27+
restore-keys: ${{ runner.os }}-${{ matrix.PYTHON_VERSION }}-pip-
28+
- uses: actions/checkout@v2
29+
with:
30+
fetch-depth: 0
31+
- uses: actions/setup-python@v2
32+
with:
33+
python-version: ${{ matrix.PYTHON_VERSION }}
34+
architecture: 'x64'
35+
- run: python -m pip install --upgrade pip setuptools wheel twine
36+
- name: Build and publish python-language-server
37+
env:
38+
TWINE_USERNAME: __token__
39+
TWINE_PASSWORD: ${{ secrets.PYPI_PYLS_TOKEN }}
40+
run: |
41+
python setup.py bdist_wheel --universal
42+
python setup.py sdist
43+
python -m twine check dist/*
44+
python -m twine upload dist/*

.github/workflows/test-mac.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
OS: 'macos'
1919
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
2020
strategy:
21-
fail-fast: false
21+
fail-fast: false
2222
matrix:
2323
PYTHON_VERSION: ['3.8', '3.7', '3.6', '2.7']
2424
timeout-minutes: 10
@@ -31,7 +31,7 @@ jobs:
3131
- uses: actions/checkout@v2
3232
- uses: actions/setup-python@v2
3333
with:
34-
python-version: ${{ matrix.PYTHON_VERSION }}
34+
python-version: ${{ matrix.PYTHON_VERSION }}
3535
architecture: 'x64'
3636
- name: Create Jedi environment for testing
3737
if: matrix.PYTHON_VERSION != '2.7'

0 commit comments

Comments
 (0)