-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (36 loc) · 930 Bytes
/
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
name: Release package to PyPI
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
environment: build
steps:
- uses: actions/checkout@v4
- run: pipx install 'poetry==${{ vars.TARGET_POETRY_VERSION }}'
- uses: actions/setup-python@v5
with:
python-version: "${{ vars.TARGET_PYTHON_VERSION }}"
cache: poetry
- run: poetry install --with cpu,dev
- run: poetry build
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist/
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
environment:
name: release
url: https://pypi.org/p/moll
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1