Skip to content

Commit

Permalink
Capabilty to release from any branch (#742)
Browse files Browse the repository at this point in the history
* Actually use the input in the workflow

* Formatting

* Update description for input
  • Loading branch information
di committed Dec 18, 2020
1 parent 5565a30 commit 98cb3dd
Showing 1 changed file with 32 additions and 24 deletions.
56 changes: 32 additions & 24 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to base the release from'
description: 'The branch, tag or SHA to release from'
required: true
default: 'master'

Expand All @@ -32,16 +32,18 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
python: [3.6, 3.7, 3.8, 3.9]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install test dependencies
run: python -m pip install tox
- name: Test
run: python -m tox -e py
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.branch }}
- name: Use Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install test dependencies
run: python -m pip install tox
- name: Test
run: python -m tox -e py

macos-built-distributions:
name: Build macOS wheels
Expand All @@ -50,6 +52,8 @@ jobs:
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
Expand All @@ -70,6 +74,8 @@ jobs:
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
Expand All @@ -92,6 +98,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.branch }}
- name: Install Python
uses: actions/setup-python@v2
- name: Build source distribution
Expand All @@ -110,16 +118,16 @@ jobs:
- source-distribution
runs-on: ubuntu-latest
steps:
- name: Download all the dists
uses: actions/download-artifact@v2
with:
name: python-package-distributions
path: dist/
- name: What will we publish?
run: ls dist
- name: Publish
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
skip_existing: true
- name: Download all the dists
uses: actions/download-artifact@v2
with:
name: python-package-distributions
path: dist/
- name: What will we publish?
run: ls dist
- name: Publish
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
skip_existing: true

0 comments on commit 98cb3dd

Please sign in to comment.