Skip to content

Commit

Permalink
Merge pull request #262 from jadolg/separate-release-workflow
Browse files Browse the repository at this point in the history
Separate release workflow from tests
  • Loading branch information
jadolg authored Oct 4, 2024
2 parents a10145a + 92caa13 commit 18c3421
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 24 deletions.
25 changes: 1 addition & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test and publish
name: Test

on:
push:
Expand Down Expand Up @@ -61,26 +61,3 @@ jobs:
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

publish:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/master' }}
needs: test
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload --skip-existing dist/*
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release

on:
release:
types: [ created ]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload --skip-existing dist/*

0 comments on commit 18c3421

Please sign in to comment.