Skip to content

Commit

Permalink
Add GitHub Actions workflow for deploying to TestPyPI
Browse files Browse the repository at this point in the history
- Implemented a new GitHub Actions workflow named "Deploy to TestPyPI" in `.github/workflow/deploy-testpypi.yaml`.
- Configured the workflow to run on Ubuntu and set up Python environment with version 3.12.
- Set up Rye for caching dependencies and syncing with it.
- Built distribution packages using Rye and published them to TestPyPI.
- Added a token for authentication to TestPyPI in the workflow configuration.

Signed-off-by: urasakikeisuke <[email protected]>
  • Loading branch information
urasakikeisuke committed May 15, 2024
1 parent 9d40592 commit 2462b31
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/deploy-testpypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Deploy to TestPyPI

on:
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Set up Rye
uses: eifinger/setup-rye@v2
with:
enable-cache: true
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Sync with Rye
run: rye sync

- name: Build distribution packages
run: rye build --clean

- name: Publish to TestPyPI
run: >
rye publish
--yes
--verbose
--repository testpypi
--repository-url https://test.pypi.org/legacy/
--token ${{ secrets.TEST_PYPI_TOKEN }}

0 comments on commit 2462b31

Please sign in to comment.