Skip to content

Commit

Permalink
make release workflow run only on release
Browse files Browse the repository at this point in the history
  • Loading branch information
akotlar committed Oct 13, 2024
1 parent 15e7bcb commit df213e9
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,9 @@
name: Python Release

on:
push:
branches:
- main
- master
tags:
- "*"
pull_request:
workflow_dispatch:
release:
types: [published] # Trigger only when a release is published
workflow_dispatch: # Optional: allows manual triggering of the workflow

permissions:
contents: read
Expand All @@ -32,26 +27,32 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install Golang
uses: actions/setup-go@v4
with:
go-version: "1.22"

- name: Update pip
run: python -m pip install --upgrade pip

- name: Install Python dependencies
run: pip install -r python/requirements-dev.txt

- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter --manifest-path python/Cargo.toml --zig
sccache: "false"
manylinux: auto

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.platform.target }}
path: dist

- name: pytest
shell: bash
run: |
Expand Down Expand Up @@ -95,25 +96,31 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install Golang
uses: actions/setup-go@v4
with:
go-version: "1.22"

- name: Update pip
run: python -m pip install --upgrade pip

- name: Install Python dependencies
run: pip install -r python/requirements-dev.txt

- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter --manifest-path python/Cargo.toml
sccache: "false"

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.platform.target }}
path: dist

- name: pytest
shell: bash
run: |
Expand All @@ -135,7 +142,7 @@ jobs:
pip install $WHEEL_FILE --verbose --force-reinstall
bystro-api --help
bystro-api --help
pip install pytest
ray start --head
Expand Down

0 comments on commit df213e9

Please sign in to comment.