-
Notifications
You must be signed in to change notification settings - Fork 5
49 lines (41 loc) · 1.14 KB
/
release.yml
File metadata and controls
49 lines (41 loc) · 1.14 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
name: Release
# Only run on new tags starting with `v`
on:
push:
tags:
- "v*"
jobs:
build:
name: Build dist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v7
with:
version: "latest"
- name: Build dist
run: |
uv run python -m build
- uses: actions/upload-artifact@v7
with:
path: ./dist/
upload_pypi:
name: Upload release to PyPI
needs: [build]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
environment:
# Note: this environment must be configured in the repo settings
name: pypi-release
url: https://pypi.org/p/async-geotiff
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/download-artifact@v8
with:
name: artifact
path: dist
merge-multiple: true
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1