-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (41 loc) · 1.26 KB
/
testpypi.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
42
43
44
45
46
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: testpypi-publish
on:
release:
types: [draft]
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository }}:base
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.REGISTRY_TOKEN }}
steps:
- uses: actions/checkout@v3.0.2
with:
fetch-depth: 0
set-safe-directory: true
- name: Force directory safe
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip wheel setuptools setuptools-scm
python3 -m pip install virtualenv
python3 -m pip install build
- name: Build package
run: python3 -m build
- name: Build bdist package
run: python3 setup.py bdist_wheel
- name: Publish package
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/