Skip to content

readme

readme #13

Workflow file for this run

name: Test, Release, and Publish
on:
push:
branches:
- "main"
- "master"
permissions:
contents: write
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]
pip install pytest build twine
- name: Check installation
run: pip list | grep hashstash
- name: Run tests
run: |
export PYTHONPATH=$PYTHONPATH:$(pwd)
python -m pytest
github-release:
name: "GitHub Release"
needs: [tests]
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
- name: "Releasing"
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: false
title: "Latest Build"
pypi-release:
name: "PyPI Release"
needs: [tests, github-release]
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[extra,dev,test]
pip install build twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python -m build
twine upload dist/*