-
Notifications
You must be signed in to change notification settings - Fork 13
41 lines (36 loc) · 1.04 KB
/
_pypi_test_publish.yaml
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
# -*- mode: yaml; coding: utf-8 -*-
#
# Copyright (C) 2023 Benjamin Thomas Schwertfeger
# All rights reserved.
# https://github.com/btschwertfeger
#
# Template workflow to build the project and publish
# the package to test PyPI.
#
name: PyPI Publish
on:
workflow_call:
secrets:
API_TOKEN:
required: true
permissions: read-all
jobs:
publish-to-test-pypi:
name: Publish Python distribution to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: this permission is mandatory for OIDC publishing
environment:
name: testpypi
url: https://test.pypi.org/p/python-cmethods
steps:
- name: Download all the distributions
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish package distributions to PyPI (optional - testpypi)
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.API_TOKEN }}
repository-url: https://test.pypi.org/legacy/