-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
11 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 |
---|---|---|
|
@@ -30,19 +30,26 @@ jobs: | |
refs/heads/main' | ||
, github.ref) | ||
concurrency: release | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Python Semantic Release | ||
id: release | ||
uses: python-semantic-release/[email protected] | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
github_token: ${{ secrets.GH_TOKEN }} | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
# NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true. | ||
# See https://github.com/actions/runner/issues/1173 | ||
if: steps.release.outputs.released == 'true' | ||
python-version: 3.11 | ||
- name: Install ci requirements | ||
run: pip install -r ci-requirements.txt | ||
- name: Release | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GA" | ||
PYTHONPATH=$PWD python setup.py sdist | ||
PYTHONPATH=$PWD semantic-release version | ||
PYTHONPATH=$PWD twine upload --non-interactive dist/* | ||
PYTHONPATH=$PWD semantic-release publish | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} |