Skip to content

Adding repository explicitly as release wasnt' found #3

Adding repository explicitly as release wasnt' found

Adding repository explicitly as release wasnt' found #3

name: On push to branch dry-run publish.
on:
push:
branches:
- EC-gha-to-publish-package-to-testpypi
workflow_dispatch:
inputs:
tag_name:
description: "Release tag (e.g., v1.0.1)"
required: true
type: string
dry_run:
description: "Dry Run? (Skip the actual upload)"
required: true
type: boolean
default: true
jobs:
upload:
runs-on: ubuntu-latest
environment: testpypi
permissions:
id-token: write
contents: read
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Download Release Assets
env:
GH_TOKEN: ${{ github.token }}
run: |
mkdir dist
gh release download 10.0.1 -R ${{ github.repository }} --dir dist --pattern "*"
- name: List files to verify
run: ls -R dist/
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
dry-run: true