Skip to content

remove test since we have another workflow #86

remove test since we have another workflow

remove test since we have another workflow #86

Workflow file for this run

name: release
on:
push:
tags:
- v*
permissions:
contents: read
jobs:
release:
runs-on: ubuntu-latest
name: Release to PyPi
steps:
- uses: actions/checkout@v3
- name: Fetch all branches
run: git fetch --prune --unshallow
- name: Check if commit is on allowed branch
run: |
if git branch -r --contains ${{ github.sha }} | grep -Eq 'origin/master|origin/polygon-lts'; then
echo "Allowed branch"
else
echo "Commit not on master or polygon-lts; skipping"
exit 1
fi
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Setup Poetry
uses: abatilo/actions-poetry@v2
- name: Get package name
id: package
run: echo "name=$(python -c \"with open('pyproject.toml') as f: lines = f.readlines(); for line in lines: if line.strip().startswith('name ='): print(line.strip().split(' = ')[1].strip('\\\"')); break\")" >> $GITHUB_OUTPUT

Check failure on line 32 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

You have an error in your yaml syntax on line 32
- name: Configure Poetry
run: |
if [ "${{ steps.package.outputs.name }}" == "polygon-api-client" ]; then
poetry config pypi-token.pypi ${{ secrets.POETRY_HTTP_BASIC_PYPI_PASSWORD }}
elif [ "${{ steps.package.outputs.name }}" == "massive" ]; then
poetry config pypi-token.pypi ${{ secrets.POETRY_HTTP_BASIC_PYPI_PASSWORD_MASSIVE }}
else
echo "Unknown package name: ${{ steps.package.outputs.name }}; skipping publish"
exit 1
fi
- name: Install deps
run: poetry install
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
- name: Version according to tag
run: poetry version ${{ steps.tag.outputs.tag }}
- name: Build
run: poetry build
- name: Publish to PyPi
run: poetry publish