MilesCranmer commited on
Commit
31ffc0e
β€’
1 Parent(s): da0bef9

Fix PyPI deployment job

Browse files
Files changed (1) hide show
  1. .github/workflows/pypi_deploy.yml +9 -5
.github/workflows/pypi_deploy.yml CHANGED
@@ -1,14 +1,19 @@
1
  name: Deploy PyPI
2
  on:
3
- workflow_run:
4
- workflows: ["Linux"]
5
- types:
6
- - completed
7
 
8
  jobs:
9
  pypi:
10
  runs-on: ubuntu-latest
11
  steps:
 
 
 
 
 
 
12
  - name: "Checkout"
13
  uses: actions/checkout@v3
14
  - name: "Set up Python"
@@ -26,7 +31,6 @@ jobs:
26
  repository_url: https://test.pypi.org/legacy/
27
  skip_existing: true
28
  - name: "Publish distribution πŸ“¦ to PyPI"
29
- if: startsWith(github.ref, 'refs/tags')
30
  uses: pypa/gh-action-pypi-publish@release/v1
31
  with:
32
  password: ${{ secrets.PYPI_API_TOKEN }}
 
1
  name: Deploy PyPI
2
  on:
3
+ push:
4
+ tags:
5
+ - 'v*.*.*'
 
6
 
7
  jobs:
8
  pypi:
9
  runs-on: ubuntu-latest
10
  steps:
11
+ - name: Wait for tests to pass
12
+ uses: lewagon/[email protected]
13
+ with:
14
+ ref: ${{ github.ref }}
15
+ check-name: 'Linux'
16
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
17
  - name: "Checkout"
18
  uses: actions/checkout@v3
19
  - name: "Set up Python"
 
31
  repository_url: https://test.pypi.org/legacy/
32
  skip_existing: true
33
  - name: "Publish distribution πŸ“¦ to PyPI"
 
34
  uses: pypa/gh-action-pypi-publish@release/v1
35
  with:
36
  password: ${{ secrets.PYPI_API_TOKEN }}