Repository navigation
58 lines (46 loc) · 1.58 KB
/
Copy pathpublish.yml
File metadata and controls
58 lines (46 loc) · 1.58 KB
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
name: Publish to PyPI
on:
push:
tags:
- 'v*'
permissions:
contents: write
id-token: write # Required for trusted publishing
jobs:
build-and-publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest
timeout-minutes: 20
environment:
name: pypi
url: https://pypi.org/p/polystore
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.12"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build "twine>=7,<8" -e ".[dev]"
- name: Test release candidate
run: python -m pytest -q
- name: Build package
run: python -m build
- name: Validate immutable release declaration
uses: OpenHCSDev/python-introspect/.github/actions/validate-python-release@a9428c3b5a5f7c4091049ac977dff8fd48f76b2e
- name: Check distribution
run: python -m twine check dist/*
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
- name: Create GitHub Release
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
with:
files: dist/*
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}