-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: fix changelog generation and add deploy
- Loading branch information
Showing
2 changed files
with
36 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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[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 }}" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters