diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 959197f..4809951 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,6 +17,8 @@ jobs: steps: - name: Checkout this Repo uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v4 @@ -24,9 +26,7 @@ jobs: 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: @@ -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 diff --git a/action.yml b/action.yml index 63c6cdd..c60330f 100644 --- a/action.yml +++ b/action.yml @@ -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