forked from audeering/audresample
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
127 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
# PyPI package | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
python -m twine upload dist/* | ||
# Docuemntation | ||
- name: Install doc dependencies | ||
run: | | ||
pip install -r requirements.txt | ||
pip install -r docs/requirements.txt | ||
- name: Build documentation | ||
run: | | ||
python -m sphinx docs/ docs/_build/ -b html | ||
- name: Deploy documentation to Github pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./docs/_build | ||
|
||
# Github release | ||
- name: Read CHANGELOG | ||
id: changelog | ||
run: | | ||
# Get bullet points from last CHANGELOG entry | ||
CHANGELOG=$(git diff -U0 HEAD^ HEAD | grep '^[+][\* ]' | sed 's/\+//') | ||
# Support for multiline, see | ||
# https://github.com/actions/create-release/pull/11#issuecomment-640071918 | ||
CHANGELOG="${CHANGELOG//'%'/'%25'}" | ||
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" | ||
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" | ||
echo "Got changelog: $CHANGELOG" | ||
echo "::set-output name=body::$CHANGELOG" | ||
- name: Create release on Github | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
body: ${{ steps.changelog.outputs.body }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-18.04, windows-latest, macOS-latest ] | ||
python-version: [3.6] | ||
include: | ||
- os: ubuntu-latest | ||
python-version: 3.7 | ||
- os: ubuntu-latest | ||
python-version: 3.8 | ||
|
||
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 dependencies | ||
run: | | ||
python -V | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r docs/requirements.txt | ||
pip install -r tests/requirements.txt | ||
- name: Test with pytest | ||
run: | | ||
python -m pytest | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./coverage.xml | ||
if: matrix.os == 'ubuntu-18.04' | ||
|
||
- name: Test building documentation | ||
run: | | ||
python -m sphinx docs/ docs/_build/ -b html -W | ||
# python -m sphinx docs/ build/sphinx/html -b linkcheck | ||
if: matrix.os == 'ubuntu-18.04' |
This file was deleted.
Oops, something went wrong.