Skip to content

Commit 4616f3f

Browse files
authored
Merge pull request #125 from dolfin-adjoint/dokken/pypi-publishing
Add pyadjoint-ad publishing workflow
2 parents 029a154 + 1fe8d19 commit 4616f3f

File tree

4 files changed

+47
-2
lines changed

4 files changed

+47
-2
lines changed

.github/workflows/pypi.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Upload release to pypi
2+
on:
3+
workflow_dispatch:
4+
push:
5+
tags: "v*"
6+
7+
jobs:
8+
pypi-publish:
9+
name: Upload release to PyPI
10+
runs-on: ubuntu-latest
11+
environment:
12+
name: pypi
13+
url: https://pypi.org/p/pyadjoint-ad
14+
permissions:
15+
id-token: write
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Setup Python
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: "3.10"
24+
25+
- name: Install dependencies
26+
run: python3 -m pip install build twine
27+
28+
- name: Build a binary wheel and a source tarball
29+
run: python3 -m build --sdist --wheel --outdir dist/ .
30+
31+
- name: Publish package distributions to PyPI
32+
uses: pypa/gh-action-pypi-publish@release/v1

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ dist/*
1515
*.xml
1616
*.msh
1717

18+
dist/
19+
build/

setup.cfg

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
[metadata]
2+
name = dolfin-adjoint
3+
description=High-level automatic differentiation library,
4+
long_description = file: README.md
5+
long_description_content_type = text/markdown
6+
url = https://github.com/dolfin-adjoint/pyadjoint
7+
author= Jørgen S. Dokken,
8+
author_email= dokken@simula.no,
9+
license = LGPL-3.0
10+
license_files = LICENSE
11+
112
[flake8]
213
exclude = .git,__pycache__,docs/,examples/,tests/,scripts/
314
max-line-length = 119

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
# 'all' includes all of the above
1313
extras['all'] = list(chain(*extras.values()))
1414

15-
setup(name='pyadjoint',
15+
setup(name='pyadjoint-ad',
1616
version='2023.0.0',
17-
description='High-level automatic differentiation library for FEniCS.',
17+
description='High-level automatic differentiation library.',
1818
author='Jørgen Dokken',
1919
author_email='dokken@simula.no',
2020
packages=['firedrake_adjoint',

0 commit comments

Comments
 (0)