-
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.
- Loading branch information
Showing
2 changed files
with
16 additions
and
18 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 |
---|---|---|
@@ -1,39 +1,39 @@ | ||
name: Publish Python Package | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build-n-publish: | ||
name: Build and publish Python 🐍 distributions 📦 to PyPI | ||
runs-on: ubuntu-latest | ||
|
||
# needs: [test] | ||
environment: release | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v3.1.0 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
cache: pip | ||
cache-dependency-path: '**/pyproject.toml' | ||
|
||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: 1.3.2 | ||
run: pip install poetry poetry-dynamic-versioning | ||
|
||
- name: Install dependencies | ||
run: poetry install --no-interaction | ||
|
||
- name: Add dynamic versioning plugin | ||
run: poetry self add "poetry-dynamic-versioning[plugin]" | ||
|
||
# - name: Install dependencies | ||
# run: poetry install --no-interaction | ||
|
||
- name: Build source and wheel archives | ||
run: | | ||
poetry build | ||
run: poetry build | ||
|
||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@v1.5.0 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} | ||
- name: Publish | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
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