Skip to content

Commit

Permalink
fix(release): fix release-please and release to PyPI workflow
Browse files Browse the repository at this point in the history
FIX #20
  • Loading branch information
sbancal committed Feb 2, 2023
1 parent 32002d7 commit dd140a0
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 57 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/release-please-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: release-please, then release to PyPI

on:
push:
branches:
- main

jobs:

release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
with:
release-type: python
package-name: release-please-action

release-to-pypi:
runs-on: ubuntu-latest
if: github.event.commits[0].author.name == 'github-actions[bot]'
needs: release-please

steps:
- name: Checkout source
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo 'export PATH="$HOME/.poetry/bin:$PATH"' >> $GITHUB_ENV
source $GITHUB_ENV
- name: Install dependencies
run: |
poetry install
pip install wheel setuptools
- name: Build package
run: make package

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
15 changes: 0 additions & 15 deletions .github/workflows/release-please.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/release-to-pypi.yml

This file was deleted.

0 comments on commit dd140a0

Please sign in to comment.