-
-
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
(#39)
- Loading branch information
1 parent
35eb287
commit 6bdfa45
Showing
3 changed files
with
22 additions
and
38 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,53 +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: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: hynek/build-and-inspect-python-package@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
publish: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
environment: | ||
name: publishing | ||
url: https://pypi.org/project/tap-betterstack | ||
if: startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
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 | ||
|
||
- name: Upload wheel to release | ||
uses: svenstaro/upload-release-action@v2 | ||
name: Packages | ||
path: dist | ||
- uses: svenstaro/upload-release-action@v2 | ||
with: | ||
file: dist/*.whl | ||
file: dist/* | ||
tag: ${{ github.ref }} | ||
overwrite: true | ||
file_glob: true | ||
|
||
- name: Publish | ||
uses: pypa/gh-action-pypi-publish@v1.8.11 | ||
- 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
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