Skip to content

Commit

Permalink
Merge pull request #27 from morcuended/master
Browse files Browse the repository at this point in the history
Modify the way of publishing on pypi using github actions
  • Loading branch information
morcuended authored Apr 29, 2021
2 parents cc324de + 94880f3 commit 16dc422
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 15 deletions.
8 changes: 0 additions & 8 deletions .github/release-drafter.yml

This file was deleted.

6 changes: 0 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,3 @@ jobs:
python --version
pip install -U pip setuptools wheel
python setup.py sdist bdist_wheel
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package

on:
release:
types: [created]

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
exclude showermodel/_dev_version.py
global-exclude *.pyc *.o
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ ShowerModel
![ShowerModel logo](docs/logo_showermodel.png)

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/JaimeRosado/ShowerModel/master?filepath=notebooks)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4306356.svg)](https://doi.org/10.5281/zenodo.4306356)
[![image](https://img.shields.io/pypi/v/ShowerModel.svg)](https://pypi.org/project/ShowerModel)
[![image](https://github.com/JaimeRosado/ShowerModel/workflows/CI/badge.svg?branch=master)](https://github.com/JaimeRosado/ShowerModel/actions?query=workflow%3ACI+branch%3Amaster)

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4727298.svg)](https://doi.org/10.5281/zenodo.4727298)

A Python package for modelling cosmic-ray showers, their light production and their detection.

Expand Down

0 comments on commit 16dc422

Please sign in to comment.