Skip to content

Commit 36642b3

Browse files
ci: Use hynek/build-and-inspect-python-package (#36)
1 parent aff5007 commit 36642b3

File tree

1 file changed

+19
-35
lines changed

1 file changed

+19
-35
lines changed

.github/workflows/release.yaml

Lines changed: 19 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,37 @@
1-
name: Publish with Dynamic Versioning
1+
name: Build
22

33
on:
4-
release:
5-
types: [published]
4+
push:
65

76
permissions:
87
contents: write
98
id-token: write
109

1110
jobs:
12-
publish:
13-
name: Publish to PyPI
11+
build:
1412
runs-on: ubuntu-latest
15-
environment: publishing
16-
env:
17-
PIP_CONSTRAINT: .github/workflows/constraints.txt
1813
steps:
19-
- name: Checkout code
20-
uses: actions/checkout@v4
14+
- uses: actions/checkout@v4
2115
with:
2216
fetch-depth: 0
17+
- uses: hynek/build-and-inspect-python-package@v2
2318

24-
- name: Set up Python
25-
uses: actions/setup-python@v5
19+
publish:
20+
runs-on: ubuntu-latest
21+
needs: build
22+
environment:
23+
name: publishing
24+
url: https://pypi.org/project/tap-socketdev
25+
if: startsWith(github.ref, 'refs/tags/')
26+
steps:
27+
- uses: actions/download-artifact@v4
2628
with:
27-
python-version: "3.11"
28-
29-
- name: Upgrade pip
30-
run: |
31-
pip install pip
32-
pip --version
33-
34-
- name: Install Poetry
35-
run: |
36-
pipx install poetry
37-
pipx inject poetry poetry-dynamic-versioning[plugin]
38-
poetry --version
39-
poetry self show plugins
40-
41-
- name: Build
42-
run: poetry build
43-
44-
- name: Upload wheel to release
45-
uses: svenstaro/upload-release-action@v2
29+
name: Packages
30+
path: dist
31+
- uses: svenstaro/upload-release-action@v2
4632
with:
47-
file: dist/*.whl
33+
file: dist/*
4834
tag: ${{ github.ref }}
4935
overwrite: true
5036
file_glob: true
51-
52-
- name: Publish
53-
uses: pypa/gh-action-pypi-publish@v1.8.11
37+
- uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)