Skip to content

Commit 056aa60

Browse files
fix: split the pypi and asset building
1 parent 7440fc8 commit 056aa60

File tree

5 files changed

+9
-35
lines changed

5 files changed

+9
-35
lines changed

.github/workflows/build_assets.yml

+5-8
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@
22
name: Build Compiled Assets
33

44
on:
5-
workflow_call:
6-
inputs:
7-
release:
8-
type: boolean
9-
default: false
10-
description: "Attach artifacts to a release"
5+
pull_request:
6+
branches:
7+
- main
118

129
jobs:
1310
build_assets:
@@ -68,12 +65,12 @@ jobs:
6865
run: ${{matrix.CMD_BUILD}}
6966
- name: Upload a Build Artifact
7067
uses: actions/upload-artifact@v4
71-
if: inputs.release == false
68+
if: startsWith(github.ref, 'refs/tags/')
7269
with:
7370
name: ${{ matrix.OUT_FILE_NAME }}
7471
path: ./dist/${{ matrix.OUT_FILE_NAME }}
7572
- name: Upload Release Asset
76-
if: inputs.release == true
73+
if: startsWith(github.ref, 'refs/tags/')
7774
id: upload-release-asset
7875
uses: svenstaro/upload-release-action@v2
7976
with:

.github/workflows/build_for_pypi.yml

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
name: Build and Optionally Publish to PyPi
22

33
on:
4-
workflow_call:
5-
inputs:
6-
publish:
7-
type: boolean
8-
default: false
9-
description: "Publish to PyPi"
4+
pull_request:
5+
branches:
6+
- main
107

118
jobs:
129
build_dist_for_pypi:
@@ -77,7 +74,7 @@ jobs:
7774
./dist/*.tar.gz
7875
./dist/*.whl
7976
- name: Publish package to PyPi
80-
if: inputs.publish == true
77+
if: startsWith(github.ref, 'refs/tags/')
8178
uses: pypa/gh-action-pypi-publish@release/v1
8279
with:
8380
attestations: false

.github/workflows/build_main.yml

-17
This file was deleted.

pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ dependencies = [
1313
"click==8.*",
1414
"httpx==0.27.*",
1515
"ijson==3.*",
16-
"pathspec>=0.12.1",
1716
"pyyaml==6.*",
1817
"regex",
1918
"responses==0.21.*",

requirements.txt

-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ idna==3.10
2929
# requests
3030
ijson==3.3.0
3131
# via codecov-cli (pyproject.toml)
32-
pathspec==0.12.1
33-
# via codecov-cli (pyproject.toml)
3432
pyyaml==6.0.2
3533
# via codecov-cli (pyproject.toml)
3634
regex==2024.11.6

0 commit comments

Comments
 (0)