You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This workflow will create a github release and upload a Python Package to pypi
2
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3
+
name: Release
4
+
# Release a new version to different targets in suitable ways
5
+
6
+
on:
7
+
workflow_call: # called from ci.yml
8
+
inputs:
9
+
to_github:
10
+
description: "Create a Github Release (repository snapshot)"
11
+
type: boolean
12
+
default: true
13
+
14
+
to_test_pypi:
15
+
description: "Publish to Test PyPI."
16
+
type: boolean
17
+
default: false
18
+
19
+
to_pypi:
20
+
description: "Publish to PyPI."
21
+
type: boolean
22
+
default: false
23
+
24
+
25
+
jobs:
26
+
27
+
github:
28
+
if: inputs.to_github
29
+
name: Create a Github Release (repository snapshot)
30
+
runs-on: ubuntu-latest
31
+
permissions:
32
+
contents: write # needed for creating a GH Release
33
+
steps:
34
+
- uses: actions/checkout@v3
35
+
- uses: softprops/action-gh-release@v1
36
+
37
+
pypi:
38
+
if: inputs.to_pypi || inputs.to_test_pypi
39
+
name: Publish to PyPI (and/or compatible repositories)
40
+
runs-on: ubuntu-latest
41
+
permissions:
42
+
id-token: write # needed for "trusted publishing" protocol
0 commit comments