Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

v0.12.0

v0.12.0 #20

Workflow file for this run

name: Release new version
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. - name: Set up Python ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install PyPDF2
pip install cycler
pip install poetry
- name: Zip corpus
run: zip -r corpus.zip corpus
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: corpus.zip
tag: ${{ github.ref }}
- name: Estimate current accuracy and generate a new plot
run: |
PYTHONPATH="$PYTHONPATH:." python scripts/mapping_accuracy_estimate.py
PYTHONPATH="$PYTHONPATH:." python scripts/accuracy_version_plot.py -v ${{ github.ref }}
- name: Build and publish module
env: # authentication
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
VERSION=$(echo ${{ github.ref }} | cut -d "v" -f 2 | xargs)
echo "Change module version to $VERSION"
poetry version $VERSION
poetry build
poetry publish -u "__token__" -p $PYPI_TOKEN
- name: Update Readme
run: |
PYTHONPATH="$PYTHONPATH:." python scripts/stats-dashboard/generate-markdown.py -v ${{ github.ref }}
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add input/accuracy/difference.csv
git add input/accuracy/version_plot.png
git commit -m "docs: generate a new accuracy plot"
git add README.md
git add scripts/stats-dashboard/descr_stats_version.csv
git add scripts/stats-dashboard/
git commit -m "docs: update README"
git add dist
git add pyproject.toml
git commit -m "chore: build module"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: dev