diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 808135f..3ef11c6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,37 +6,15 @@ on: - "v*.*.*" jobs: - release: + build: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - name: Build and publish to pypi + uses: JRubics/poetry-publish@v1.17 with: - python-version: 3.12 - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install poetry - poetry install - - - name: Configure for Test PyPI - run: | - poetry config repositories.testpypi https://test.pypi.org/legacy/ - poetry config pypi-token.testpypi ${{ secrets.TEST_PYPI_TOKEN }} - - - name: Publish to Test PyPI - run: | - poetry publish --build -r testpypi - - - name: Publish to PyPI - if: startsWith(github.ref, 'refs/tags/v') - run: | - poetry config pypi-token.pypi ${{ secrets.PYPI_API_KEY }} - poetry publish --build + pypi_token: ${{ secrets.PYPI_API_KEY }} + - name: Create Github Release if: startsWith(github.ref, 'refs/tags/v') uses: actions/create-release@v1 @@ -47,5 +25,4 @@ jobs: release_name: Release ${{ github.ref }} draft: false prerelease: false - files: | - dist/* +