-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (37 loc) · 1.01 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
41
42
43
44
45
46
47
name: Release
on:
push:
branches:
- '*'
tags:
- '*'
workflow_dispatch:
jobs:
build-and-publish:
runs-on: ubuntu-latest
# from https://docs.pypi.org/trusted-publishers/using-a-publisher/
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install build dependencies
run: python -m pip install -U setuptools wheel build
- name: Build
run: python -m build .
- name: Run python tests
run: |
python setup.py egg_info
pip install -r requirements-tests.txt
python -m unittest tests/test_api_client.py
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true