-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (44 loc) · 1.39 KB
/
test_pypi.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Source: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
# This job runs only when pushing to release-testpypi
# Version number (manually set in setup.py) must differ from the current version number
# for the upload to succeed
# https://test.pypi.org/project/NeuroRuler/
name: test_pypi
on:
push:
branches:
- 'release-testpypi'
jobs:
tests:
uses: ./.github/workflows/tests.yml # Use the callable tests job to run tests
build-and-publish:
name: Build and publish to Test PyPI
needs: [tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
# See https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository
# for how to add a secret
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/