Skip to content

fix workflows

fix workflows #16

Workflow file for this run

name: Run tests and release
on:
push:
tags:
- "*"
workflow_dispatch:
workflow_call:
env:
PROJECT_FOLDER: "pirogue"
PYTHON_VERSION_RELEASE: "3.9"
PIROGUE_VERSION: ${{ github.ref_name }}
jobs:
tests:
name: "Tests"
uses: ./.github/workflows/test.yml
secrets: inherit
build-python-wheel:
name: "🐍 Python Wheel"
uses: ./.github/workflows/wheel.yml
secrets: inherit
release-gh:
name: "Release on tag 🚀"
runs-on: ubuntu-latest
needs: [build-python-wheel, tests]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- name: Retrieve artifact from Python build
uses: actions/download-artifact@v3
with:
name: python_wheel
path: dist/
- name: Create/update release on GitHub
uses: ncipollo/[email protected]
with:
allowUpdates: true
artifacts: "builds**/*"
generateReleaseNotes: true
omitNameDuringUpdate: true
token: ${{ secrets.GITHUB_TOKEN }}
release-pypi:
name: "🐍 Release on PyPI"
runs-on: ubuntu-latest
needs: [build-python-wheel, tests]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- name: Retrieve artifact from Python build
uses: actions/download-artifact@v3
with:
name: python_wheel
path: dist/
# -- FROM HERE, A TAG IS REQUIRED ---
- name: Deploy to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Create/update release on GitHub
uses: ncipollo/[email protected]
with:
allowUpdates: true
artifacts: "dist/*.tar.gz"
generateReleaseNotes: true
omitNameDuringUpdate: true
token: ${{ secrets.GITHUB_TOKEN }}