Skip to content

Commit

Permalink
Merge pull request #33 from jjjermiah/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
jjjermiah committed Dec 16, 2023
2 parents 92e90e2 + 74041f4 commit f7a2f2a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ name: Unit Tests
on:
push:
# push to any branch
branches:
- '*'
branches: [ main ]
pull_request:
branches: [ main ]

Expand Down Expand Up @@ -44,7 +43,9 @@ jobs:

Continuous-Deployment:
needs: Continuous-Integration
if: github.ref == 'refs/heads/main' # github.event_name == 'push' &&

# if pulling to main, deploy to PyPI
if: github.ref == 'refs/heads/main'

# Set up operating system
runs-on: ubuntu-latest
Expand Down Expand Up @@ -74,14 +75,21 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

# - name: Use Python Semantic Release to prepare release
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# git config user.name github-actions
# git config user.email github-actions@github.com
# poetry run semantic-release publish
- name: Publish package distributions to PyPI
id: pypi-publish

if: steps.release.outputs.released == 'true'
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

- name: Publish package distributions to GitHub Releases
uses: python-semantic-release/upload-to-gh-release@main
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# - name: Publish to TestPyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ build-backend = "poetry.core.masonry.api"

# https://python-semantic-release.readthedocs.io/en/latest/configuration.html
[tool.semantic_release]
version_variable = "setup.py:__version__"
version_variables = [
"setup.py:__version__"
]
version_toml = [
"pyproject.toml:tool.poetry.version",
]
Expand Down

0 comments on commit f7a2f2a

Please sign in to comment.