Skip to content

check out new branch #6

check out new branch

check out new branch #6

Workflow file for this run

name: pomdp-py package pypi deployment
on:
push:
tags:
- 'v*'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
testpypi-publish:
name: publish to Test PyPi
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/tags/vdev-latest' }}
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
environment:
name: testpypi
url: https://test.pypi.org/p/pomdp-py/
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
contents: write
steps:
- name: Set Variables
if: startsWith(github.ref, 'refs/tags/v')
run: echo "VERSION=\"Version ${{ github.ref_name }}\"" >> $GITHUB_ENV
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v4
with:
ref: 'dev-latest'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Run release script
working-directory: .
run: |
cd scripts
./pomdp_py_release.sh ${{ vars.RELEASE_ATTEMPT_COUNT }}
- name: Upload to Test PyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
# This will upload stuff under dist/ to PyPI
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip-existing: true
- name: Release artifact
uses: softprops/action-gh-release@v1
with:
name: ${{ env.VERSION }}
files: dist/*.whl
pypi-publish:
name: publish to PyPi
runs-on: ubuntu-latest
if: ${{ github.ref != 'refs/tags/vdev-latest' }}
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
environment:
name: pypi
url: https://pypi.org/p/pomdp-py/
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
contents: write
steps:
- name: Set Variables
if: startsWith(github.ref, 'refs/tags/v')
run: echo "VERSION=\"Version ${{ github.ref_name }}\"" >> $GITHUB_ENV
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v4
with:
ref: "dev-${{ github.ref_name.split('v')[1] }}"

Check failure on line 94 in .github/workflows/pypi_deployment.yml

View workflow run for this annotation

GitHub Actions / pomdp-py package pypi deployment

Invalid workflow file

The workflow is not valid. .github/workflows/pypi_deployment.yml (Line: 94, Col: 14): Unexpected symbol: '('. Located at position 22 within expression: github.ref_name.split('v')[1]
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Run release script
working-directory: .
run: |
cd scripts
./pomdp_py_release.sh ${{ vars.RELEASE_ATTEMPT_COUNT }}
- name: Upload to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
# This will upload stuff under dist/ to PyPI
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
repository_url: https://pypi.org/
skip-existing: true
- name: Release artifact
uses: softprops/action-gh-release@v1
with:
name: ${{ env.VERSION }}
files: dist/*.whl