Skip to content

Commit

Permalink
setuptools_scm uses git full history for packaging
Browse files Browse the repository at this point in the history
changes to master branch are  uploaded as nightly builds to test-pypi
  • Loading branch information
2bndy5 committed Sep 29, 2023
1 parent a520e5d commit 6b222cc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ jobs:
steps:
- name: Checkout this Repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x

- name: Install Workflow Dependencies
run: |
python -m pip install build twine pre-commit -r tests/requirements.txt -r requirements.txt
python -m build
run: python3 -m pip install build twine pre-commit -r tests/requirements.txt -r requirements.txt

- uses: actions/cache@v3
with:
Expand All @@ -47,18 +47,26 @@ jobs:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- run: python3 -m build

- name: twine Check
run: |
python setup.py sdist
twine check dist/*
run: twine check dist/*

- name: twine Upload
- name: twine Upload (pipy)
if: github.event_name == 'release'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.pypi_token }}
run: twine upload dist/*

- name: twine Upload (test-pipy)
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
run: twine upload dist/*


Build:
if: github.event_name == 'push' && github.ref_name == 'master'
runs-on: windows-latest
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ inputs:
author:
description: "Account Username maintaining the rmskin package. Defaults to Username that triggered the commit."
required: false
default: ${{ github.repository_owner }}
default: ${{ github.repository_owner }}
path:
description: "Base directory of repo being packaged. Defaults to workflow's workspace path"
required: false
Expand Down

0 comments on commit 6b222cc

Please sign in to comment.