Skip to content

Commit ca30240

Browse files
committed
Rebuilding the whl as this is most straightforward.
1 parent 284469a commit ca30240

1 file changed

Lines changed: 33 additions & 32 deletions

File tree

.github/workflows/publish-to-test-pypi.yaml

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,47 +4,48 @@ on:
44
push:
55
branches:
66
- EC-gha-to-publish-package-to-testpypi
7-
workflow_dispatch:
8-
inputs:
9-
tag_name:
10-
description: "Release tag (e.g., v1.0.1)"
11-
required: true
12-
type: string
13-
dry_run:
14-
description: "Dry Run? (Skip the actual upload)"
15-
required: true
16-
type: boolean
17-
default: true
7+
# This to be used for live instead of on branch:
8+
# tags:
9+
# - '[0-9]*' # Triggers on tags like 10.0.1
10+
# workflow_dispatch:
11+
# inputs:
12+
# tag_name:
13+
# description: "Release tag (e.g., 10.0.1)"
14+
# required: true
15+
# type: string
16+
# dry_run:
17+
# description: "Dry Run? (Skip the actual upload)"
18+
# required: true
19+
# type: boolean
20+
# default: true
1821

1922
jobs:
20-
upload:
23+
publish:
2124
runs-on: ubuntu-latest
2225
environment: testpypi
2326
permissions:
24-
id-token: write
27+
id-token: write # Needed for Trusted Publishing
2528
contents: read
2629

2730
steps:
28-
- name: Checkout Code
31+
- name: Checkout Code at Tag
2932
uses: actions/checkout@v4
33+
with:
34+
# Hardcoded for testing.
35+
ref: "10.0.1"
3036

31-
- name: Debug List Releases
32-
env:
33-
GH_TOKEN: ${{ github.token }}
34-
run: gh release list
37+
- name: Set up Python
38+
uses: actions/setup-python@v5
39+
with:
40+
python-version: "3.x"
3541

36-
# - name: Download Release Assets
37-
# env:
38-
# GH_TOKEN: ${{ github.token }}
39-
# run: |
40-
# mkdir dist
41-
# gh release download 10.0.1 -R ${{ github.repository }} --dir dist --pattern "*"
42+
- name: Re-build Wheel
43+
run: |
44+
pip install wheel
45+
python setup.py bdist_wheel
4246
43-
# - name: List files to verify
44-
# run: ls -R dist/
45-
#
46-
# - name: Publish to TestPyPI
47-
# uses: pypa/gh-action-pypi-publish@release/v1
48-
# with:
49-
# repository-url: https://test.pypi.org/legacy/
50-
# dry-run: true
47+
- name: Publish to TestPyPI
48+
uses: pypa/gh-action-pypi-publish@release/v1
49+
with:
50+
repository-url: https://test.pypi.org/legacy/
51+
dry-run: true

0 commit comments

Comments
 (0)