Skip to content

Commit

Permalink
chore(workflows): do not publish wheels in pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
XuehaiPan committed Aug 7, 2022
1 parent 3023bc9 commit 3f19246
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
runs-on: ubuntu-latest
needs: [build-sdist, build-wheels]
if: |
github.repository == 'metaopt/TorchOpt' &&
github.repository == 'metaopt/TorchOpt' && github.event_name != 'pull_request' &&
(github.event_name != 'workflow_dispatch' || github.event.inputs.task == 'build-and-publish') &&
(github.event_name != 'push' || startsWith(github.ref, 'refs/tags/'))
timeout-minutes: 15
Expand All @@ -123,12 +123,20 @@ jobs:
exit 1
fi
- name: Download built sdist and wheels
- name: Download built sdist
uses: actions/download-artifact@v3
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
name: sdist
path: dist

- name: Download built wheels
uses: actions/download-artifact@v3
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: wheels
path: dist

- name: Publish to TestPyPI
Expand Down

0 comments on commit 3f19246

Please sign in to comment.