Skip to content

Commit

Permalink
Clean up release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ndrezn committed Nov 22, 2024
1 parent 5855435 commit b5b58e2
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,36 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Setup uv
- name: Setup dependencies
# Set up the virtual environment and install dev dependencies (JS & Python)
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
shell: bash
- name: Generate distribution
run: |
source .venv/bin/activate
uv pip install ".[dev]"
npm i
shell: bash
- name: Run tests
# Run all tests before generating the distribution
run: |
source .venv/bin/activate
npm run build
npm run test
shell: bash
- name: Generate distribution
# Run setup.py to generate the distribution
run: |
source .venv/bin/activate
npm run dist
npm pack && mv *.tgz dist/
- name: Validate distribution
# Run tests again using the generated wheel file
run: |
uv venv test-dist
source dist/bin/activate
WHL_FILE=$(ls dist/*.whl)
uv pip install "${WHL_FILE}[dev]"
npm run test
shell: bash
- uses: ncipollo/release-action@v1
with:
Expand Down

0 comments on commit b5b58e2

Please sign in to comment.