diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 3c61b51..b345d9b 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -36,7 +36,7 @@ jobs: cd: # Only run this job if the "ci" job passes - needs: ci + # needs: ci # Only run this job if new work is pushed to "main" if: github.event_name == 'push' && github.ref == 'refs/heads/main' @@ -62,14 +62,24 @@ jobs: - name: Install package run: poetry install - - name: Use Python Semantic Release to prepare release - env: - # This token is created automatically by GH Actions - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # This action uses Python Semantic Release v8 + - name: Python Semantic Release + id: release + uses: python-semantic-release/python-semantic-release@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + + + - name: Install packaging-related tool + run: + python3 -m pip install build twine + + - name: Build package run: | - git config user.name github-actions - git config user.email github-actions@github.com - poetry run semantic-release publish + poetry version $(git describe --tags --abbrev=0 | sed 's/^v//') + python -m build --sdist --wheel --outdir dist/ . + ls dist/ + - name: Publish to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1