-
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.
feat: add poetry-dynamic-versioning (#61)
Co-authored-by: Will Da Silva <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
b74eb30
commit 1c4168b
Showing
3 changed files
with
77 additions
and
29 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Build & Release | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build_and_release: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.10' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
- name: Build package | ||
run: | | ||
poetry self add "poetry-dynamic-versioning[plugin]" | ||
poetry config repositories.testpypi https://test.pypi.org/legacy/ | ||
poetry dynamic-versioning --no-cache | ||
poetry build | ||
- name: Upload wheel to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: dist/*.whl | ||
tag: ${{ github.ref }} | ||
overwrite: true | ||
file_glob: true | ||
- name: Deploy to PyPI | ||
run: | | ||
poetry publish -u "__token__" -p "${{ secrets.PYPI_TOKEN }}" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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