Skip to content

Commit

Permalink
build wheels on push but only upload when tagged
Browse files Browse the repository at this point in the history
  • Loading branch information
dmeliza committed Feb 2, 2024
1 parent 1698359 commit e1ec1c7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Set update schedule for GitHub Actions

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
13 changes: 4 additions & 9 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
name: Build wheels

# on: [push, pull_request]
# Alternatively, to publish when a (published) GitHub Release is created, use the following:
on:
release:
types:
- published
on: [push, pull_request]

jobs:
build:
name: Build source and wheels
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build wheels
run: pipx run build
- uses: actions/upload-artifact@v3
Expand All @@ -23,9 +18,9 @@ jobs:
needs: build
runs-on: ubuntu-latest
# upload to PyPI on every tag starting with 'v'
#if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
# alternatively, to publish when a GitHub Release is created, use the following rule:
if: github.event_name == 'release' && github.event.action == 'published'
# if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
*.arf
*.wav
/examples/
.DS_Store

0 comments on commit e1ec1c7

Please sign in to comment.