Retry zenodo upload #29
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: dao-analyzer CI | |
on: [push] | |
jobs: | |
testing_python: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8","3.9","3.10", "3.11"] | |
env: | |
DEBUG: TRUE | |
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 wheel tox tox-gh-actions | |
- name: Test with tox | |
run: tox | |
package: | |
runs-on: ubuntu-latest | |
needs: [testing_python] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Downloading tags to gen version name | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
cache: 'pip' | |
- name: Install build deps | |
run: python -m pip install --upgrade pip build wheel | |
- name: Build package | |
run: python -m build | |
- name: Archive built package | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: ./dist/ | |
pypi: | |
runs-on: ubuntu-latest | |
needs: [package] | |
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' | |
# Specifying a GitHub environment is optional, but strongly encouraged | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing | |
id-token: write | |
steps: | |
- name: Download built package | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
path: ./dist/ | |
- name: Publish package | |
uses: pypa/gh-action-pypi-publish@release/v1 |