Skip to content

Commit

Permalink
chore: Improve publish CI
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Dec 22, 2024
1 parent 174ba27 commit 74e1d32
Showing 1 changed file with 47 additions and 8 deletions.
55 changes: 47 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,9 @@ jobs:
details: Technical CI
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}

deploy:
build:
needs: [ test, test_windows ]
runs-on: ubuntu-22.04
if: (github.event_name == 'push' || github.event_name == 'release') && github.repository == 'freqtrade/technical'
environment:
name: release
url: https://pypi.org/p/technical
permissions:
id-token: write
steps:
- uses: actions/checkout@v4

Expand All @@ -214,15 +208,60 @@ jobs:
pip install -U build
python -m build --sdist --wheel
- name: Upload artifacts 📦
uses: actions/upload-artifact@v4
with:
name: technical
path: |
dist
retention-days: 10

deploy-test-pypi:
if: (github.event_name == 'release') && github.repository == 'freqtrade/technical'
needs: [ build ]
runs-on: ubuntu-22.04
environment:
name: pypi-test
url: https://test.pypi.org/p/technical
permissions:
id-token: write

steps:

- name: Download artifact 📦
uses: actions/download-artifact@v4
with:
name: technical
path: dist
merge-multiple: true

- name: Publish to PyPI (Test)
uses: pypa/[email protected]
if: (github.event_name == 'release')
with:
repository-url: https://test.pypi.org/legacy/

deploy-pypi:
if: (github.event_name == 'release') && github.repository == 'freqtrade/technical'
needs: [ build ]
runs-on: ubuntu-22.04
environment:
name: pypi
url: https://pypi.org/p/technical
permissions:
id-token: write

steps:

- name: Download artifact 📦
uses: actions/download-artifact@v4
with:
name: technical
path: dist
merge-multiple: true

- name: Publish to PyPI
uses: pypa/[email protected]
if: (github.event_name == 'release')

- name: Discord notification
uses: rjstone/discord-webhook-notify@v1
Expand Down

0 comments on commit 74e1d32

Please sign in to comment.