Skip to content

Fix syntax err

Fix syntax err #10

Workflow file for this run

name: deploy
on:
push:
tags:
- v*
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Infer version from changelog
id: inferred-version
run: |
echo "v`head -n 1 $GITHUB_WORKSPACE/CHANGELOG.rst | grep -oP '(?<=\*\*)[0-9]+\.[0-9]+\.[0-9]+(?= -)'`"
echo "SEMVER=v`head -n 1 $GITHUB_WORKSPACE/CHANGELOG.rst | grep -oP '(?<=\*\*)[0-9]+\.[0-9]+\.[0-9]+(?= -)'`" >> $GITHUB_OUTPUT
# - name: Create tag
# uses: actions/github-script@v5
# with:
# script: |
# github.rest.git.createRef({
# owner: context.repo.owner,
# repo: context.repo.repo,
# ref: 'refs/tags/<tagname>',
# sha: context.sha
# })
- name: Create Release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
ls -la $GITHUB_WORKSPACE
echo ${{ github.workspace }}
gh release create ${{ steps.inferred-version.SEMVER }} --generate-notes --verify-tag
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python --version
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
echo "TEST COMPLETED"
# twine upload dist/*