Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dustalov committed Jul 27, 2024
1 parent f51dbe2 commit 90460a2
Showing 1 changed file with 13 additions and 21 deletions.
34 changes: 13 additions & 21 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: Deploy

on:
workflow_run:
workflows: [ "Tests" ]
branches: [ "master" ]
types: [ "completed" ]
release:
types: [ "published" ]
workflow_dispatch:
Expand All @@ -18,7 +14,6 @@ env:
jobs:
build-sdist:
name: build sdist
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -34,7 +29,6 @@ jobs:
name: package_sdist
path: dist
build:
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -107,11 +101,10 @@ jobs:
with:
name: package_${{ matrix.os }}_${{ matrix.target }}_${{ matrix.interpreter || 'all' }}_${{ matrix.manylinux }}
path: dist
pypi:
if: github.event_name == 'release'
testpypi:
environment:
name: pypi
url: https://pypi.org/p/evalica
name: testpypi
url: https://test.pypi.org/p/evalica
permissions:
id-token: write
runs-on: ubuntu-latest
Expand All @@ -126,18 +119,20 @@ jobs:
merge-multiple: true
path: dist
- run: ls -lh dist/
- name: Publish to PyPI
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
testpypi:
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
pypi:
if: github.event_name == 'release'
environment:
name: testpypi
url: https://test.pypi.org/p/evalica
name: pypi
url: https://pypi.org/p/evalica
permissions:
id-token: write
runs-on: ubuntu-latest
needs:
- build-sdist
- build
needs: testpypi
steps:
- name: Download packages
uses: actions/download-artifact@v4
Expand All @@ -146,8 +141,5 @@ jobs:
merge-multiple: true
path: dist
- run: ls -lh dist/
- name: Publish to TestPyPI
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true

0 comments on commit 90460a2

Please sign in to comment.