Update CITATION.cff #37
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
# Runs a build test every time a commit is pushed to branch 'main'. | |
name: Test and Publish Python Package | |
on: | |
push: | |
branches: [ main ] | |
workflow_run: | |
workflows: [ Merge to Main ] | |
types: | |
- completed | |
jobs: | |
build-test: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: [3.8, 3.10.4] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run Tests | |
run: | | |
python test_project/manage.py test ddm | |
publish-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Install Antora | |
run: npm i antora | |
- name: Generate Site | |
run: npx antora docs/antora-playbook.yml | |
- name: Publish to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/build/site | |
deploy: | |
needs: build-test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build | |
- name: Generate new setup.cfg | |
run: bash version_bump.sh | |
- name: Build package | |
run: python -m build | |
- name: Publish package | |
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
- name: Dispatch signal to DDL | |
uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{ secrets.PERSONAL_WORKFLOW_TOKEN }} | |
repository: uzh/ddl | |
event-type: new-ddm-version | |
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}' |