-
Notifications
You must be signed in to change notification settings - Fork 4
67 lines (57 loc) · 1.83 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Release
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v3
id: release
with:
release-type: python
package-name: haptools
- uses: actions/checkout@v3
if: ${{ steps.release.outputs.release_created }}
with:
fetch-depth: 2
- name: Set up Python
if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: Upgrade pip
if: ${{ steps.release.outputs.release_created }}
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip --version
- name: Install Poetry
if: ${{ steps.release.outputs.release_created }}
run: |
pip install --constraint=.github/workflows/constraints.txt poetry
poetry --version
- name: Bump version for developmental release
if: ${{ steps.release.outputs.release_created }}
env:
version: ${{ steps.release.outputs.tag_name }}
run: |
poetry version $version
- name: Build package
if: ${{ steps.release.outputs.release_created }}
run: |
poetry build --ansi
- name: Publish package on TestPyPI
if: ${{ steps.release.outputs.release_created }}
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish package on PyPI
if: ${{ steps.release.outputs.release_created }}
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}