-
Notifications
You must be signed in to change notification settings - Fork 87
43 lines (41 loc) · 1.27 KB
/
main.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
name: Release
on:
push:
branches:
- master
permissions:
contents: write
pull-requests: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: python
package-name: pyattck
bump-minor-pre-major: true
bump-patch-for-minor-pre-major: true
include-v-in-tag: false
# The logic below handles the PyPi distribution:
- uses: actions/checkout@v3
# these if statements ensure that a publication only occurs when
# a new release is created:
if: ${{ steps.release.outputs.release_created }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
if: ${{ steps.release.outputs.release_created }}
- name: Set up poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.3.2
if: ${{ steps.release.outputs.release_created }}
- name: Publish
run: |
poetry config http-basic.pypi "${{ secrets.PYPI_USERNAME }}" "${{ secrets.PYPI_PASSWORD }}"
poetry publish --build
if: ${{ steps.release.outputs.release_created }}