-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 991 Bytes
/
workflow.yaml
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
on:
push:
branches:
- 'master'
jobs:
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
contents: read
steps:
# retrieve your distributions here
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: false
- name: build python
run: |
poetry build
- name: Mint pypi token
id: mint
uses: tschm/token-mint-action@v1.0.3
- name: Publish the package with poetry
run: |
poetry publish -u __token__ -p '${{ steps.mint.outputs.api-token }}'