Skip to content

Commit ccbb35a

Browse files
authored
Merge pull request #25 from contentauth/ok-nick/fix-publish
Revert to old workflow style and add parameter to workflow_dispatch
2 parents 5f13299 + 132b6a3 commit ccbb35a

File tree

3 files changed

+29
-43
lines changed

3 files changed

+29
-43
lines changed

.github/workflows/build.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
name: Build
22

33
on:
4-
workflow_call:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
tags:
9+
- "*"
10+
workflow_dispatch:
11+
inputs:
12+
publish:
13+
description: 'Publish'
14+
required: true
15+
default: 'false'
516

617
jobs:
718
linux:
@@ -133,3 +144,20 @@ jobs:
133144
name: wheels
134145
path: dist
135146

147+
release:
148+
name: Release
149+
runs-on: ubuntu-latest
150+
environment: Publish
151+
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true'
152+
needs: [linux, windows, macos_x86, macos_aarch64, sdist]
153+
steps:
154+
- uses: actions/download-artifact@v3
155+
with:
156+
name: wheels
157+
- name: Publish to PyPI
158+
uses: PyO3/maturin-action@v1
159+
env:
160+
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
161+
with:
162+
command: upload
163+
args: --non-interactive --skip-existing *

.github/workflows/ci-build.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)