mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 22:57:56 -05:00
- created a new 'release.yml' file which is a GH Action that is triggered by a new Published Release - it builds python from the latest in the main branch, and then will push it to pip (that part is commented out for this first pass for testing) Small changes to the setup.py for python-awips builds - changed the doc url to point to our new/current doc site - changed the author's email from mj's to support-awips Add in logic for publishing release to pypi
52 lines
1.2 KiB
YAML
52 lines
1.2 KiB
YAML
name: Build python-awips and Publish for pip
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
release:
|
|
types:
|
|
- published
|
|
|
|
jobs:
|
|
build:
|
|
name: Build Release Packages
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python
|
|
id: setup
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.x
|
|
|
|
- name: Install build tools
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install --upgrade setuptools
|
|
- name: Build packages
|
|
run: python setup.py sdist
|
|
|
|
- name: Save built packages as artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ runner.os }}-${{ steps.setup.outputs.python-version }}
|
|
path: dist/
|
|
retention-days: 5
|
|
|
|
publish:
|
|
name: Publish to PyPI
|
|
needs: build
|
|
environment:
|
|
name: PyPI
|
|
url: https://pypi.org/project/python-awips/
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Download packages
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
path: ./dist
|
|
|
|
- name: Publish Package
|
|
uses: pypa/gh-action-pypi-publish@v1.4.2
|
|
with:
|
|
user: __token__
|
|
password: ${{ secrets.PYPI_TOKEN }}
|