Skip to content

Commit

Permalink
copy dist action from earthkit-data
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyCMWF committed Aug 25, 2023
1 parent fd94dab commit 4cc1b33
Showing 1 changed file with 34 additions and 19 deletions.
53 changes: 34 additions & 19 deletions .github/workflows/on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,37 @@ jobs:
runs-on: ubuntu-latest
needs: [combine-environments]
steps:
- uses: actions/checkout@v3
- name: Install packages
run: |
$CONDA/bin/python -m pip install build twine
- name: Build distributions
run: |
$CONDA/bin/python -m build
- name: Check wheels
run: |
cd dist || exit
$CONDA/bin/python -m pip install earthkit_climate*.whl || exit
$CONDA/bin/python -m twine check * || exit
$CONDA/bin/python -c "from earthkit import climate"
- name: Publish a Python distribution to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- name: Build distributions
run: |
$CONDA/bin/python -m pip install build
$CONDA/bin/python -m build
- name: Publish a Python distribution to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
# steps:
# - uses: actions/checkout@v3
# - name: Install packages
# run: |
# $CONDA/bin/python -m pip install build twine
# - name: Build distributions
# run: |
# $CONDA/bin/python -m build
# - name: Check wheels
# run: |
# cd dist || exit
# $CONDA/bin/python -m pip install earthkit_climate*.whl || exit
# $CONDA/bin/python -m twine check * || exit
# $CONDA/bin/python -c "from earthkit import climate"
# - name: Publish a Python distribution to PyPI
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 4cc1b33

Please sign in to comment.