-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (33 loc) · 927 Bytes
/
publish.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
name: Publish to PYPI
on:
release:
paths-ignore:
- 'README.md'
- 'LICENSE'
- '.gitignore'
types:
- created
jobs:
regular:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install poetry
run: pipx install poetry
- name: Update package version
run: |
release_version=${{ github.event.release.tag_name }}
sed -i "s/^version = .*/version = \"$release_version\"/" pyproject.toml
sed -i "s/__version__ = .*/__version__ = \"$release_version\"/" wavy_totem_lib/__init__.py
- name: Compile package
run: |
poetry build
- name: Upload package
uses: pypa/gh-action-pypi-publish@release/v1