-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (44 loc) · 1.25 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: release
on:
workflow_run:
workflows:
- check
branches:
- main
types:
- completed
jobs:
release_please:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
steps:
- uses: actions/checkout@v3
- uses: GoogleCloudPlatform/release-please-action@v3
id: release_please
with:
release-type: python
package-name: hashpipe
pull-request-title-pattern: "chore: release${component} ${version}"
outputs:
release_created: ${{ steps.release_please.outputs.release_created }}
sha: ${{ steps.release_please.outputs.sha }}
pypi_upload:
runs-on: ubuntu-latest
needs: release_please
if: needs.release_please.outputs.release_created
steps:
- uses: actions/checkout@v3
with:
ref: ${{ needs.release_please.outputs.sha }}
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Create release assets
run: |
set -euxo pipefail
python3 -m pip install -U setuptools wheel
python3 setup.py sdist bdist_wheel
ls dist
- uses: pypa/gh-action-pypi-publish@v1.4.2
with:
password: ${{ secrets.PYPI_API_TOKEN }}