Skip to content

Commit

Permalink
Merge pull request #71 from ChalkLab/split-release-yamls
Browse files Browse the repository at this point in the history
Split release yamls
  • Loading branch information
JohnsonDylan committed Mar 1, 2022
2 parents fa23070 + f90f1fc commit f51e5ea
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 42 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ on:
push:
branches:
- '*'
tags:
- 'v*'

jobs:
build:
Expand Down Expand Up @@ -47,24 +45,3 @@ jobs:
poetry run pytest --cov=scidatalib --cov-report=term-missing tests/
pip install coverage
bash <(curl -s https://codecov.io/bash)
- name: Build Python package and Upload to TestPyPi
shell: bash -l {0}
if: startsWith( github.ref, 'refs/tags/v') && matrix.python-version == env.PYTHON_MAIN_VERSION
env:
TEST_PYPI_TOKEN_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
run: |
poetry update
poetry build
poetry config repositories.testpypi https://test.pypi.org/legacy/
poetry publish -r testpypi --username "__token__" --password $TEST_PYPI_TOKEN_PASSWORD
- name: Build Python package and Upload to PyPi
shell: bash -l {0}
if: startsWith( github.ref, 'refs/tags/v') && matrix.python-version == env.PYTHON_MAIN_VERSION
env:
PYPI_TOKEN_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
poetry update
poetry build
poetry publish --username "__token__" --password $PYPI_TOKEN_PASSWORD
40 changes: 40 additions & 0 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release to PyPi

env:
POETRY_VERSION: 1.1.4

on:
push:
branches: 'master'
tags: 'v[0-9]+.[0-9]+.[0-9]+-*'

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.7"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install poetry==${{ env.POETRY_VERSION }}
poetry install
- name: Build Python package and Upload to PyPi
shell: bash -l {0}
if: startsWith( github.ref, 'refs/tags/v')
env:
PYPI_TOKEN_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
poetry update
poetry build
poetry publish --username "__token__" --password $PYPI_TOKEN_PASSWORD
41 changes: 41 additions & 0 deletions .github/workflows/test-releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release to TestPyPi

env:
POETRY_VERSION: 1.1.4

on:
push:
branches: 'master'
tags: 'test-v[0-9]+.[0-9]+.[0-9]+-*'

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.7"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install poetry==${{ env.POETRY_VERSION }}
poetry install
- name: Build Python package and Upload to TestPyPi
shell: bash -l {0}
if: startsWith( github.ref, 'refs/tags/test-')
env:
TEST_PYPI_TOKEN_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
run: |
poetry update
poetry build
poetry config repositories.testpypi https://test.pypi.org/legacy/
poetry publish -r testpypi --username "__token__" --password $TEST_PYPI_TOKEN_PASSWORD
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -233,3 +233,5 @@ cython_debug/
#.idea/

# End of https://www.toptal.com/developers/gitignore/api/python

*.swp
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ Get code coverage reporting using the [pytest-cov](https://pytest-cov.readthedoc
poetry run pytest --cov=scidatalib --cov-report=term-missing tests/
```

# Release

For developers, please see [Release Workflow](https://github.com/ChalkLab/SciDataLib/wiki/Release-Workflow).

# Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Expand Down
19 changes: 0 additions & 19 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,21 +1,2 @@
[metadata]
# replace with your username:
name = SciDataLib
version = 0.2.5
url = https://github.com/ChalkLab/SciDataLib
author = 'Dylan Johnson, Marshall McDonnell, Stuart Chalk'
author_email = 'n01448636@unf.edu, mcdonnellmt@ornl.gov, schalk@unf.edu'
classifiers =
Programming Language :: Python :: 3
License :: OSI Approved :: MIT License
Operating System :: OS Independent
description = Python library for creation of SciData JSON-LD files
long_description = file: README.md
long_description_content_type = text/markdown

[options]
python_requires = >=3.6

[flake8]
# add options

0 comments on commit f51e5ea

Please sign in to comment.