Skip to content

Commit

Permalink
Merge pull request #80 from pangeo-forge/add-release-yaml
Browse files Browse the repository at this point in the history
Automate releases with `release.yaml`
  • Loading branch information
cisaacstern authored Aug 29, 2023
2 parents 5b2faba + 1c8ba25 commit b4e918a
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 3 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release

on:
push:
tags: ["**"]

jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools setuptools-scm wheel twine toml
- name: Build
run: |
python setup.py sdist bdist_wheel
python setup.py --version
twine check dist/*
ls -l dist
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
if: startsWith(github.ref, 'refs/tags/')

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST
_version.py

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ autodoc-traits
myst-parser
pre-commit
pydata-sphinx-theme
sphinx>=1.7
sphinx>=1.7,<7.2 # https://github.com/sphinx-doc/sphinx/issues/11631
sphinx-copybutton
11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]

[project]
name = "pangeo-forge-runner"
dynamic = ["version"]

[tool.setuptools_scm]
write_to = "pangeo_forge_runner/_version.py"
write_to_template = "__version__ = '{version}'"

[tool.isort]
# Prevent isort & black from fighting each otherd
profile = "black"
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
readme = f.read()

setup(
name="pangeo-forge-runner",
description="Commandline tool to manage pangeo-forge feedstocks",
long_description=readme,
long_description_content_type="text/markdown",
author="Yuvi Panda",
author_email="[email protected]",
version="0.7.2",
packages=find_packages(),
python_requires=">=3.9",
install_requires=[
Expand Down

0 comments on commit b4e918a

Please sign in to comment.