-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.12 KB
/
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
41
42
43
44
45
46
47
name: Publish
on: create
jobs:
build:
runs-on: ubuntu-latest
if: github.event.ref_type == 'tag'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install system packages
run: |
sudo apt-get -qq update
sudo apt-get install -y spatialite-bin libsqlite3-mod-spatialite
- name: Get python versions
uses: chris48s/satisfying-python@main
id: python-versions
- name: Build, Test, Lint
uses: chris48s/python-package-shared@main
with:
python-version: '${{ steps.python-versions.outputs.min }}'
pre-install: flit
- uses: actions/upload-artifact@v4
with:
path: ./dist
publish:
needs: build
runs-on: ubuntu-latest
if: github.event.ref_type == 'tag'
permissions:
contents: none
id-token: write # required for trusted publishing
environment: publish
steps:
- uses: actions/download-artifact@v4
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: artifact/
print-hash: true