Skip to content

Commit

Permalink
Once is enough.
Browse files Browse the repository at this point in the history
  • Loading branch information
mlondschien committed Sep 16, 2024
1 parent 541f4fa commit c6a36a9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 47 deletions.
39 changes: 20 additions & 19 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,6 @@ on:
name: release

jobs:
upload-testpypi:
needs: [python-build]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
environment:
name: test_release
url: https://test.pypi.org/p/ivmodels
permissions:
id-token: write

steps:
- uses: actions/download-artifact@v3
with:
name: wheels
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

python-build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -55,6 +36,26 @@ jobs:
name: wheels
path: dist/*

upload-testpypi:
needs: [python-build]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
environment:
name: test_release
url: https://test.pypi.org/p/ivmodels
permissions:
id-token: write

steps:
- uses: actions/download-artifact@v3
with:
name: wheels
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

upload-pypi:
needs: [python-build, upload-testpypi]
runs-on: ubuntu-latest
Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,31 +55,3 @@ jobs:
python-version: "3.12"
- name: Run pre-commit checks
uses: pre-commit/[email protected]

python-build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.10'

- name: Install build dependencies
run: python -m pip install build

- name: Build source distribution and wheel
run: python -m build --sdist --wheel

- name: Install wheel
run: python -m pip install dist/*.whl

- name: Test import
run: python -c "from ivmodels import KClass"

- uses: actions/upload-artifact@v3
with:
name: wheels
path: dist/*

0 comments on commit c6a36a9

Please sign in to comment.