Skip to content

Commit

Permalink
CI: fix changelog generation and add deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
GPMueller committed Jul 27, 2021
1 parent a9933c4 commit 50e872b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 5 deletions.
35 changes: 33 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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[email protected]
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 }}"
Expand Down
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 50e872b

Please sign in to comment.