Skip to content

Commit

Permalink
fix: 🐛 Fix release yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
dancoon committed Jan 30, 2024
1 parent d724286 commit 6c2808b
Showing 1 changed file with 7 additions and 30 deletions.
37 changes: 7 additions & 30 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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
Expand All @@ -47,5 +25,4 @@ jobs:
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
files: |
dist/*

0 comments on commit 6c2808b

Please sign in to comment.