Skip to content

Potential fix for code scanning alert no. 1: Workflow does not contai… #27

Potential fix for code scanning alert no. 1: Workflow does not contai…

Potential fix for code scanning alert no. 1: Workflow does not contai… #27

Workflow file for this run

# This workflow will upload a Python Package to PyPI when a release is created

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

View workflow run for this annotation

GitHub Actions / .github/workflows/publish.yml

Invalid workflow file

(Line: 46, Col: 9): A sequence was not expected
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Upload Python Package
on:
release:
types: [published]
permissions:
contents: read
jobs:
build-package:
uses: ./.github/workflows/pipeline.yml
with:
os: ubuntu-latest
run-lint: true
run-typecheck: true
run-test: true
run-build: true
cross-test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12", "3.13"]
uses: ./.github/workflows/pipeline.yml
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
run-lint: false
run-typecheck: false
run-test: true
run-build: false
pypi-publish:
runs-on: ubuntu-latest
needs:
- [build-package, cross-test]
permissions:
id-token: write
environment:
name: pypi
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
url: https://pypi.org/project/chordnet
#
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
# ALTERNATIVE: exactly, uncomment the following line instead:
# url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}
steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true