mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 14:57:56 -05:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
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@v4
|
|
- name: Set up Python
|
|
id: setup
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.x
|
|
|
|
- name: Install build tools
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install --upgrade build
|
|
python -m pip install --upgrade setuptools
|
|
- name: Build packages
|
|
run: python -m build
|
|
|
|
- name: Save built packages as artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
path: dist/
|
|
retention-days: 5
|
|
|
|
publish:
|
|
name: Publish to PyPI
|
|
needs: build
|
|
environment:
|
|
name: PyPI
|
|
url: https://pypi.org/project/python-awips/
|
|
permissions:
|
|
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Download packages
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: ./dist
|
|
name: artifact
|
|
|
|
- name: Publish Package
|
|
uses: pypa/gh-action-pypi-publish@v1.12.4
|