Skip to content

Commit

Permalink
chore: add build tools
Browse files Browse the repository at this point in the history
  • Loading branch information
Barabazs committed Nov 6, 2022
1 parent 4401b1b commit 4a07f19
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and release

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.7"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade wheel
- name: Build wheels
run: python setup.py bdist_wheel

- name: Release to Github
uses: softprops/action-gh-release@v1
with:
files: dist/*

- name: Publish package to PyPi
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint

on: [push, pull_request]

jobs:
lint:
# We want to run on external PRs, but not on our own internal PRs as they'll be run
# by the push to the branch. Without this if check, checks are duplicated since
# internal PRs match both the push and pull_request events.
if:
github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
github.repository

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3

- name: Pre Commit
uses: pre-commit/action@v2.0.3
15 changes: 15 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
files: \.py$
default_stages: [commit]
fail_fast: true

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer

- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires=">=3.6",
python_requires=">=3.7",
install_requires=[
"instapaper==0.4",
"feedly-client==0.25",
Expand Down

0 comments on commit 4a07f19

Please sign in to comment.