-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
e625485
commit 1c0e279
Showing
1 changed file
with
16 additions
and
9 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,16 +1,23 @@ | ||
name: Publish | ||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
pypi_release: | ||
name: Builds Using Poetry and Publishes to PyPI | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build and publish to pypi | ||
uses: JRubics/[email protected] | ||
with: | ||
pypi_token: ${{ secrets.PYPI_TOKEN }} | ||
plugins: "poetry-dynamic-versioning-plugin" | ||
- uses: actions/setup-python@v3 | ||
- name: Install Poetry | ||
run: curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python | ||
- name: Add Poetry to path | ||
run: echo "${HOME}/.poetry/bin" >> $GITHUB_PATH | ||
- name: Install dynamic versioning | ||
run: poetry self add "poetry-dynamic-versioning[plugin]" | ||
- run: poetry install | ||
- run: poetry config pypi-token.pypi "${{ secrets.PYPI_API_KEY }}" | ||
- name: Publish package | ||
run: poetry publish --build | ||
|