mirror of
https://github.com/pypa/gh-action-pypi-publish.git
synced 2024-12-28 18:04:50 -05:00
Add test upload workflow
This commit is contained in:
parent
5d1679fa6b
commit
9022aae148
1 changed files with 43 additions and 0 deletions
43
.github/workflows/test-upload.yml
vendored
Normal file
43
.github/workflows/test-upload.yml
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
name: Test Upload
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
devpi:
|
||||
image: muccg/devpi
|
||||
env:
|
||||
DEVPI_PASSWORD: abcd1234
|
||||
ports:
|
||||
- 3141
|
||||
steps:
|
||||
- run: python3 -m pip install --upgrade pip build twine
|
||||
- run: mkdir -p src/test_package
|
||||
- run: echo '__version__ = "0.1"' > src/test_package/__init__.py
|
||||
- run: echo "# Test Package" > README.md
|
||||
- run: echo "$CONTENTS" > pyproject.toml
|
||||
env:
|
||||
CONTENTS: |
|
||||
[build-system]
|
||||
requires = ["setuptools>=61", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
[project]
|
||||
name = "test-package"
|
||||
version = "0.1"
|
||||
readme = "README.md"
|
||||
- run: python3 -m build
|
||||
- run: twine register dist/*.tar.gz
|
||||
env:
|
||||
TWINE_USERNAME: root
|
||||
TWINE_PASSWORD: abcd1234
|
||||
TWINE_REPOSITORY_URL: http://localhost:${{ job.services.devpi.ports['3141'] }}/root/public/
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
path: test
|
||||
- uses: ./test
|
||||
with:
|
||||
user: root
|
||||
password: abcd1234
|
||||
repository_url: http://devpi:3141/root/public/
|
Loading…
Reference in a new issue