-
Notifications
You must be signed in to change notification settings - Fork 335
49 lines (43 loc) · 1.18 KB
/
push_build_to_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
name: Distribute build to PyPi Test
on:
workflow_dispatch:
jobs:
# --- Bump version
bump-version:
runs-on: ubuntu-latest
environment: deploy-pypi-test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Bump versions
uses: remorses/bump-version@js
with:
version_file: ./arcade/VERSION
prerelease_tag: dev
env:
GITHUB_TOKEN: ${{ secrets.MY_TOKEN }}
# --- Deploy to pypi
deploy-to-pypi-test:
runs-on: ubuntu-latest
environment: deploy-pypi-test
needs: bump-version
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-tags: 'true'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install dependencies
run: >-
python3 -m pip install build twine
- name: Build and Upload to Test PyPI
run: |
python3 -m build --sdist --wheel --outdir dist/
python3 -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_TEST_TOKEN }}
TWINE_REPOSITORY: testpypi