Skip to content

Commit

Permalink
Update PyPI.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
radumarias authored Jun 2, 2024
1 parent f628eaf commit c648ed8
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions .github/workflows/PyPI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Trigger target workflow
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { owner, repo } = context.repo;
const workflow_id = 'tests.yml'; // or use the workflow ID if known
const ref = 'main'; // the branch you want to run the workflow on
await github.actions.createWorkflowDispatch({
owner,
repo,
workflow_id,
ref,
});
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token $GITHUB_TOKEN" \
https://api.github.com/repos/${{ github.repository }}/actions/workflows/tests.yml/dispatches \
-d '{"ref":"main"}'
linux:
runs-on: ${{ matrix.platform.runner }}
strategy:
Expand Down Expand Up @@ -144,7 +139,7 @@ jobs:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [linux, windows, macos, sdist]
needs: [tests, linux, windows, macos, sdist]
steps:
- uses: actions/download-artifact@v4
- name: Publish to PyPI
Expand Down

0 comments on commit c648ed8

Please sign in to comment.