Skip to content

build: prepare pykore 0.2.1 for pypi #1

build: prepare pykore 0.2.1 for pypi

build: prepare pykore 0.2.1 for pypi #1

Workflow file for this run

name: Publish PyPI

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

View workflow run for this annotation

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

Invalid workflow file

(Line: 61, Col: 9): Unrecognized named-value: 'secrets'. Located at position 49 within expression: github.event.inputs.repository == 'testpypi' && secrets.TEST_PYPI_API_TOKEN != '', (Line: 76, Col: 9): Unrecognized named-value: 'secrets'. Located at position 104 within expression: github.event.inputs.repository == 'pypi' && github.event.inputs.confirm_testpypi_verified == 'true' && secrets.PYPI_API_TOKEN != ''
on:
workflow_dispatch:
inputs:
repository:
description: Target repository
required: true
default: testpypi
type: choice
options:
- testpypi
- pypi
confirm_testpypi_verified:
description: Confirm TestPyPI install verification was completed before publishing to PyPI
required: false
default: false
type: boolean
permissions:
contents: read
jobs:
build-wheels:
name: Build manylinux wheels
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [x86_64, aarch64]
steps:
- uses: actions/checkout@v5
- uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: auto
args: --release --out dist
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.target }}
path: dist
build-sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist
publish-testpypi:
name: Upload to TestPyPI
runs-on: ubuntu-latest
needs: [build-wheels, build-sdist]
if: ${{ github.event.inputs.repository == 'testpypi' && secrets.TEST_PYPI_API_TOKEN != '' }}
steps:
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
publish-pypi:
name: Upload to PyPI
runs-on: ubuntu-latest
needs: [build-wheels, build-sdist]
if: ${{ github.event.inputs.repository == 'pypi' && github.event.inputs.confirm_testpypi_verified == 'true' && secrets.PYPI_API_TOKEN != '' }}
steps:
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}