Skip to content

Commit

Permalink
add py-setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ric-evans committed Nov 15, 2024
1 parent fbaffea commit 78b43ae
Showing 1 changed file with 37 additions and 10 deletions.
47 changes: 37 additions & 10 deletions .github/workflows/wipac-cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ on: [ push ]

jobs:

###########################################################################
# LINTERS
###########################################################################

py-versions:
runs-on: ubuntu-latest
outputs:
Expand All @@ -17,6 +13,10 @@ jobs:
- id: versions
uses: WIPACrepo/[email protected]

###########################################################################
# LINTERS
###########################################################################

flake8:
needs: [ py-versions ]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -45,6 +45,24 @@ jobs:
python-version: ${{ matrix.py3 }}
- uses: WIPACrepo/[email protected]

###########################################################################
# PACKAGING
###########################################################################

py-setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- uses: WIPACrepo/[email protected]
with:
python_min: 3.9
pypi_name: icecube-voka
author: IceCube
author_email: [email protected]
keywords: "histogram comparison" "outlier detection" "statistical tests" "empirical p-value threshold" "poissonian statistics"

###########################################################################
# TESTS
###########################################################################
Expand Down Expand Up @@ -75,16 +93,25 @@ jobs:
release:
# only run on main/master/default
if: format('refs/heads/{0}', github.event.repository.default_branch) == github.ref
needs: [ flake8, mypy, tests ]
needs: [ flake8, mypy, py-setup, tests ]
runs-on: ubuntu-latest
concurrency: release
concurrency: release # prevent any possible race conditions
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Python Semantic Release
uses: python-semantic-release/[email protected]
# Python-Package Version Bump
- uses: python-semantic-release/[email protected]
id: psr-psr
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# PyPI Release
- uses: pypa/[email protected]
if: steps.psr-psr.outputs.released == 'true'
with:
password: ${{ secrets.PYPI_TOKEN }}
# GitHub Release
- uses: python-semantic-release/[email protected]
if: steps.psr-psr.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
repository_username: __token__
repository_password: ${{ secrets.PYPI_TOKEN }}

0 comments on commit 78b43ae

Please sign in to comment.