-
-
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.
ci: Use
hynek/build-and-inspect-python-package
(#52)
- Loading branch information
1 parent
f2a804d
commit 94ab2c3
Showing
1 changed file
with
16 additions
and
27 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,48 +1,37 @@ | ||
name: Publish with Dynamic Versioning | ||
name: Build | ||
|
||
on: | ||
release: | ||
types: [published] | ||
push: | ||
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
|
||
jobs: | ||
publish: | ||
name: Publish to PyPI | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: publishing | ||
env: | ||
PIP_CONSTRAINT: .github/workflows/constraints.txt | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Upgrade pip | ||
run: | | ||
pip install pip | ||
pip --version | ||
- name: Install Poetry | ||
run: | | ||
pipx install poetry | ||
pipx inject poetry poetry-dynamic-versioning[plugin] | ||
poetry --version | ||
poetry self show plugins | ||
- name: Build | ||
run: poetry build | ||
- uses: hynek/build-and-inspect-python-package@v2 | ||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
environment: | ||
name: publishing | ||
url: https://pypi.org/project/tap-pushbullet | ||
if: startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: Packages | ||
path: dist | ||
- uses: svenstaro/upload-release-action@v2 | ||
with: | ||
file: dist/*.whl | ||
tag: ${{ github.ref }} | ||
overwrite: true | ||
file_glob: true | ||
|
||
- uses: pypa/gh-action-pypi-publish@release/v1 |