Skip to content

1.1.2

1.1.2 #1

Workflow file for this run

name: 'PyPI publish'
on:
release:
types: [published]
jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
if: github.event.release.target_commitish == 'main'
environment:
name: pypi
url: https://pypi.org/p/clusopt_core
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- uses: actions/checkout@v3
- name: Bump version
run: |
NEW_VERSION=${{ github.event.release.tag_name }}
sed -i "s/version = .*/version = $NEW_VERSION/" setup.cfg
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
cache: 'pipenv'
- id: update pip

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

View workflow run for this annotation

GitHub Actions / PyPI publish

Invalid workflow file

The workflow is not valid. .github/workflows/publish.yml (Line: 35, Col: 13): The identifier 'update pip' is invalid. IDs may only contain alphanumeric characters, '_', and '-'. IDs must start with a letter or '_' and and must be less than 100 characters. .github/workflows/publish.yml (Line: 38, Col: 13): The identifier 'install build' is invalid. IDs may only contain alphanumeric characters, '_', and '-'. IDs must start with a letter or '_' and and must be less than 100 characters.
run: python -m pip install --upgrade pip
- id: install build
run: pip install build==1.2.1
- name: Install dependencies
run: pip install -r requirements.txt
- name: Build
run: python -m build --sdist .
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1