-
Notifications
You must be signed in to change notification settings - Fork 18
37 lines (32 loc) · 894 Bytes
/
publish.yaml
File metadata and controls
37 lines (32 loc) · 894 Bytes
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
name: Publish to PyPI
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/hdx-python-api
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- uses: actions/checkout@v6
- name: Get history and tags for versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Install Hatch
uses: pypa/hatch@install
- name: Build with hatch
run: |
hatch build
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1