diff --git a/.github/workflows/on_release.yml b/.github/workflows/on_release.yml deleted file mode 100644 index 4a8e00b..0000000 --- a/.github/workflows/on_release.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Bump version - -on: - # release: - # types: [published] - workflow_dispatch: - inputs: - version: - description: Version for publishing - required: true - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - ref: main - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - name: Get version - id: version - uses: actions/github-script@v6 - with: - result-encoding: string - script: | - if (context.payload.inputs && context.payload.inputs.version) { - return context.payload.inputs.version - } - return context.ref.split('/').pop() - - name: Install - run: | - python -m pip install poetry pip - poetry config virtualenvs.create false - poetry install -n - - name: Bump version - env: - VERSION: ${{ steps.version.outputs.result }} - run: | - echo "Bumping version to ${VERSION}" - poetry version ${VERSION} - rm -rf *.egg-info || true - poetry install -n - - name: Commit changes - env: - VERSION: ${{ steps.version.outputs.result }} - run: | - git config --global user.email "github-actions" - git config --global user.name "github-actions@github.com" - git add pyproject.toml - git commit -m "Release ${VERSION}" - git push - - name: Publish to PyPI - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - poetry build - poetry run twine upload --non-interactive dist/*