Skip to content

Commit

Permalink
Merge pull request #3436 from Saransh-cpp/fortnightly-wheels
Browse files Browse the repository at this point in the history
Build wheels on the 1st and 15th of every month
  • Loading branch information
Saransh-cpp committed Oct 11, 2023
2 parents bd5e240 + 0e83ee5 commit eb50d90
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/release_reminder.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Create {{ date | date('YY.MM') }} (final or rc0) release
labels: priority:high
---
Quarterly reminder to create a -

Expand Down
6 changes: 6 additions & 0 deletions .github/wheel_failure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Fortnightly build for wheels failed
labels: priority:high, bug
---

The build is failing with the following logs - {{ env.LOGS }}
22 changes: 19 additions & 3 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Build and publish package to PyPI
on:
release:
types: [published]
schedule:
# Run at 10 am UTC on day-of-month 1 and 15.
- cron: "0 10 1,15 * *"
workflow_dispatch:
inputs:
target:
Expand Down Expand Up @@ -151,6 +154,7 @@ jobs:
if-no-files-found: error

publish_pypi:
if: github.event_name != 'schedule'
name: Upload package to PyPI
needs: [build_wheels, build_windows_wheels, build_sdist]
runs-on: ubuntu-latest
Expand All @@ -164,9 +168,7 @@ jobs:
mv windows_wheels/* wheels/* sdist/* files/
- name: Publish on PyPI
if: |
github.event.inputs.target == 'pypi' ||
(github.event_name == 'push' && github.ref == 'refs/heads/main')
if: github.event.inputs.target == 'pypi' || github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
Expand All @@ -181,3 +183,17 @@ jobs:
password: ${{ secrets.TESTPYPI_TOKEN }}
packages-dir: files/
repository-url: https://test.pypi.org/legacy/

open_failure_issue:
needs: [build_windows_wheels, build_wheels, build_sdist]
name: Open an issue if build fails
if: ${{ always() && contains(needs.*.result, 'failure') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LOGS: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
filename: .github/wheel_failure.md

0 comments on commit eb50d90

Please sign in to comment.