diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f8d39b..355614a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,6 +58,32 @@ jobs: - name: 👆 Upload coverage run: codecov + + deploy-pypi: + if: github.event_name == 'push' && startsWith( github.ref, 'refs/tags/' ) + needs: test + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: '3.8' + + - name: ⚙ Install clang-build + run: | + pip install setuptools twine + python setup.py sdist + + - name: 🚀 Deploy to PyPI + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: twine upload --skip-existing dist/* + + draft-release: if: github.event_name == 'push' && startsWith( github.ref, 'refs/tags/' ) needs: [test] @@ -67,12 +93,17 @@ jobs: steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: 📄 Generate a changelog id: changelog - uses: metcalfc/changelog-generator@v1.0.0 + uses: heinrichreimer/github-changelog-generator-action@v2.2 with: - myToken: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} + onlyLastTag: "true" + stripHeaders: "true" + stripGeneratorNotice: "true" - name: 📄 Print the changelog run: echo "${{ steps.changelog.outputs.changelog }}" diff --git a/setup.cfg b/setup.cfg index 9a2d32f..5fb62c5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,9 +3,9 @@ name = clang-build author = Trick-17 summary = Easy build tool for C++ projects focussing on simplicity license = MIT -home-page = https://github.com/Trick-17/clang-build -long-description = file: README.md -long-description-content-type = text/markdown +home_page = https://github.com/Trick-17/clang-build +long_description = file: README.md +long_description_content_type = text/markdown keywords = clang, build [files]