forked from bazel-contrib/rules_python
-
Notifications
You must be signed in to change notification settings - Fork 1
32 lines (30 loc) · 1.03 KB
/
Copy pathpublish_pypi.yaml
File metadata and controls
32 lines (30 loc) · 1.03 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
name: Publish to PyPI
on:
workflow_call:
inputs:
tag_name:
description: "release tag: tag that will be released"
required: true
type: string
workflow_dispatch:
inputs:
tag_name:
description: "release tag: tag that will be released"
required: true
type: string
jobs:
publish_pypi:
name: Publish runfiles to PyPI
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
ref: ${{ inputs.tag_name || github.ref_name }}
- env:
# This special value tells pypi that the user identity is supplied within the token
TWINE_USERNAME: __token__
# Note, the PYPI_API_TOKEN is for the rules-python pypi user, added by @rickylev on
# https://github.com/bazel-contrib/rules_python/settings/secrets/actions
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: bazel run --stamp --embed_label=${{ inputs.tag_name || github.ref_name }} //python/runfiles:wheel.publish