Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Publish package automatically (FLAPI-2004) #24

Merged
merged 8 commits into from
Dec 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: main

on:
push:
branches:
- "*"
tags:
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"

jobs:
publish:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'duffelhq/duffel-api-python'

runs-on: ubuntu-latest

needs: [test]

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: pip install build tox tox-gh-actions
- name: Build package
run: python -m build
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: pip install tox tox-gh-actions
- name: Test using tox
run: tox
- name: Linting
run: tox -e linting
- name: Check code documentation
run: tox -e doc
- name: Check formatting
run: tox -e format -- --check
28 changes: 0 additions & 28 deletions .github/workflows/python.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="duffel-api",
version="0.0.1",
version="1.0.0-rc1",
author="Duffel Engineering",
author_email="[email protected]",
description="Client library for the Duffel API",
Expand Down