Release 1.1.1 (#26) #6
Workflow file for this run
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
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@v3 | |
with: | |
fetch-depth: 2 | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: .cache/audbcards | |
key: audbcards | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
# Remove apt repos that are known to break from time to time | |
# See https://github.com/actions/virtual-environments/issues/323 | |
- name: Remove broken apt repos | |
run: | | |
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done | |
# Documentation | |
- name: Install audio + video libraries | |
run: | | |
sudo apt-get update | |
sudo apt-get install --no-install-recommends --yes libsndfile1 sox ffmpeg mediainfo | |
pip install -r docs/requirements.txt | |
- name: Build documentation | |
run: | | |
export AUDBCARDS_CACHE_ROOT=".cache/audbcards" | |
python pre-fill-cache.py | |
python -m sphinx docs/ build/html -b html | |
- name: Deploy documentation to Github pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build/html | |
# 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: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
name: Release ${{ github.ref_name }} | |
body: ${{ steps.changelog.outputs.body }} |