forked from GoogleCloudPlatform/functions-framework-python
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (30 loc) · 1.04 KB
/
release.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
name: Release to PyPI
on:
release:
types: [published]
permissions:
contents: read
jobs:
build-and-pubish:
name: Build and Publish
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ github.event.release.tag_name }}
- name: Install Python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
- name: Install build dependencies
run: python -m pip install -U setuptools build wheel
- name: Build distributions
run: python -m build
- name: Publish
uses: pypa/gh-action-pypi-publish@c12cc61414480c03e10ea76e2a0a1a17d6c764e2 # main
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}