Skip to content

Commit dd17ff0

Browse files
authored
Update ci.yml
1 parent 72c1b5e commit dd17ff0

File tree

1 file changed

+33
-12
lines changed

1 file changed

+33
-12
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,59 @@
11
---
22
name: CI
33

4-
on: [push, pull_request]
4+
on: [push, pull_request, workflow_dispatch]
55

66
permissions:
7-
contents: read
7+
contents: write
88

99
jobs:
10-
distros:
11-
name: "Ubuntu with Python ${{ matrix.python-version }}"
12-
runs-on: "ubuntu-20.04"
10+
build:
11+
name: "${{ matrix.os }} with Python ${{ matrix.python-version }}"
12+
runs-on: ${{ matrix.os }}
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "pypy3"]
16+
python-version: ["3.10", "3.11", "pypy3.10"]
17+
os: ["ubuntu-latest", "macos-latest"]
1718
steps:
1819
- name: Checkout
19-
uses: "actions/checkout@v2"
20+
uses: "actions/checkout@v3"
2021
- name: Install apt dependencies
2122
run: |
2223
set -ex
2324
sudo apt update
2425
sudo apt install -y ldap-utils slapd enchant-2 libldap2-dev libsasl2-dev apparmor-utils
26+
if: runner.os == 'Linux'
2527
- name: Disable AppArmor
2628
run: sudo aa-disable /usr/sbin/slapd
29+
if: runner.os == 'Linux'
2730
- name: Set up Python ${{ matrix.python-version }}
28-
uses: actions/setup-python@v2
31+
uses: actions/setup-python@v4
2932
with:
3033
python-version: ${{ matrix.python-version }}
3134
- name: "Install Python dependencies"
3235
run: |
3336
set -xe
3437
python -V
35-
python -m pip install --upgrade pip setuptools
36-
python -m pip install --upgrade tox tox-gh-actions
37-
- name: "Test tox with Python ${{ matrix.python-version }}"
38-
run: "python -m tox"
38+
python -m pip install --upgrade pip setuptools build
39+
- name: "build python-ldap ${{ matrix.python-version }}"
40+
run: "python -m build"
41+
- name: Upload a Build Artifact
42+
uses: actions/upload-artifact@v3
43+
with:
44+
# A file, directory or wildcard pattern that describes what to upload
45+
path: dist/*.whl
46+
release:
47+
name: "Release"
48+
needs: build
49+
runs-on: ubuntu-latest
50+
steps:
51+
- name: Download Artifacts
52+
# will download and upack all files from the default artifact named 'artifact'
53+
uses: actions/download-artifact@v3
54+
- name: GH Release
55+
uses: softprops/action-gh-release@v0.1.15
56+
with:
57+
tag_name: latest
58+
files: |
59+
*.whl

0 commit comments

Comments
 (0)