Skip to content

Commit

Permalink
Add the build & publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
BoboTiG committed Jul 5, 2021
1 parent 30420e9 commit 18f799e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build & Publish

on:
pull_request:
paths:
- ".github/workflows/build-and-publish.yml"
- "setup.*"

workflow_dispatch:
inputs:
branch:
description: "The branch, tag or SHA to release from"
required: true
default: "master"

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.branch }}
- name: Install Python
uses: actions/setup-python@v2
- name: Install build dependencies
run: python -m pip install --upgrade pip build
- name: Build wheels
run: python -m build
- name: What will we publish?
run: ls -l dist
- name: Publish
if: github.event.inputs.branch != ''
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
skip_existing: true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
dist
*.egg-info
__pycache__
venv
.vscode
Expand Down

0 comments on commit 18f799e

Please sign in to comment.