Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate releases with release.yaml #80

Merged
merged 6 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading