Skip to content

Commit

Permalink
Merge pull request #161 from cta-observatory/add_deploy_ci
Browse files Browse the repository at this point in the history
Add deploy workflow
  • Loading branch information
aleberti authored Oct 24, 2023
2 parents b35fd4a + 0daf933 commit 670aa69
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: CI

on: [push, pull_request]
on:
push:
branches:
- master
tags:
- '**'
pull_request:

env:
NUMBA_NUM_THREADS: 1
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy to PyPI

on:
push:
tags:
- 'v*'

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# make sure we have version info
- run: git fetch --tags

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"

- name: Install dependencies
run: |
python --version
pip install -U pip setuptools wheel setuptools_scm[toml]
python setup.py sdist bdist_wheel
- name: Publish package
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}

0 comments on commit 670aa69

Please sign in to comment.