Skip to content

wip

wip #6

name: Publish library to TestPyPI

Check failure on line 1 in .github/workflows/publish-to-test-pypi.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish-to-test-pypi.yml

Invalid workflow file

(Line: 15, Col: 15): Expected format {org}/{repo}[/path]@ref. Actual 'actions/setup-python', (Line: 28, Col: 15): Expected format {org}/{repo}[/path]@ref. Actual 'actions/upload-artifact', (Line: 48, Col: 15): Expected format {org}/{repo}[/path]@ref. Actual 'actions/download-artifact'
on: workflow_dispatch
jobs:
build:
name: Build distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
-r src/science_mode_4/requirements.txt
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact
with:
name: python-package-distributions
path: dist/
publish-to-testpypi:
name: Publish library to TestPyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/science_mode_4
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact
with:
name: python-package-distributions
path: dist/
- name: Publish distribution to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/