-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (50 loc) · 1.31 KB
/
release-prod.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
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
name: Publish PyPI
on:
push:
branches:
- main
permissions: read-all
jobs:
release-prod:
name: Publish PyPI
runs-on: ubuntu-latest
environment:
name: release-prod
url: https://pypi.org/p/msps
permissions:
contents: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: poetry
- name: Install packages
run: poetry install
- name: Build
run: poetry build
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Sign the dists with Sigstore
uses: sigstore/gh-action-sigstore-python@v3.0.0
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Get version
run: echo "VERSION=$(poetry --short version)" >> $GITHUB_ENV
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
"${VERSION}"
dist/**
--repo '${{ github.repository }}'
--generate-notes
--title "${VERSION}"