Skip to content

Commit d5b72de

Browse files
committed
Add deployment workflow
1 parent 9238134 commit d5b72de

File tree

3 files changed

+79
-3
lines changed

3 files changed

+79
-3
lines changed

.github/workflows/wheel.yml

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,33 @@
11
name: wheel
22

3-
on: [push, workflow_dispatch]
3+
on:
4+
push:
5+
workflow_dispatch:
6+
release:
7+
types: [published]
48

59
jobs:
10+
source:
11+
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
shell: bash -l {0}
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Setup Python
18+
uses: mamba-org/provision-with-micromamba@main
19+
with:
20+
environment-file: assets/ci/build-env.yaml
21+
- run: |
22+
meson setup _build
23+
meson dist -C _build --no-tests --include-subprojects
24+
mv _build/meson-dist/*.tar.xz .
25+
- uses: actions/upload-artifact@v3
26+
with:
27+
name: dftd3-source
28+
path: ./*.tar.xz
29+
retention-days: 5
30+
631
sdist:
732
runs-on: ubuntu-latest
833
defaults:
@@ -86,3 +111,54 @@ jobs:
86111
name: dftd3-python-${{ matrix.python }}
87112
path: ./*.whl
88113
retention-days: 5
114+
115+
release:
116+
needs:
117+
- source
118+
- sdist
119+
- manylinux
120+
runs-on: ubuntu-latest
121+
steps:
122+
- name: Download artifacts
123+
uses: actions/download-artifact@v2
124+
with:
125+
path: ${{ github.workspace }} # This will download all files
126+
127+
- name: Create SHA256 checksums
128+
run: |
129+
set -ex
130+
for output in dftd3*/*dftd3*; do
131+
pushd $(dirname "$output")
132+
sha256sum $(basename "$output") | tee $(basename "$output").sha256
133+
popd
134+
done
135+
136+
- name: Copy release artifacts
137+
run: |
138+
mkdir dist/
139+
cp -v dftd3*/dftd3*.whl dftd3*/dftd3*.tar.gz dist/
140+
141+
- name: Publish to Test PyPI
142+
if: ${{ github.event_name == 'release' }}
143+
uses: pypa/gh-action-pypi-publish@release/v1
144+
with:
145+
user: __token__
146+
password: ${{ secrets.TEST_PYPI_TOKEN }}
147+
repository_url: https://test.pypi.org/legacy/
148+
149+
- name: Upload assets
150+
uses: svenstaro/upload-release-action@v2
151+
if: ${{ github.event_name == 'release' }}
152+
with:
153+
repo_token: ${{ secrets.GITHUB_TOKEN }}
154+
file: dftd3*/*dftd3*
155+
file_glob: true
156+
tag: ${{ github.ref }}
157+
overwrite: true
158+
159+
- name: Publish to PyPI
160+
if: ${{ github.event_name == 'release' }}
161+
uses: pypa/gh-action-pypi-publish@release/v1
162+
with:
163+
user: __token__
164+
password: ${{ secrets.PYPI_TOKEN }}

subprojects/mctc-lib.wrap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[wrap-git]
22
directory = mctc-lib
33
url = https://github.com/grimme-lab/mctc-lib
4-
revision = v0.3.0
4+
revision = v0.3.1

subprojects/toml-f.wrap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[wrap-git]
22
directory = toml-f
33
url = https://github.com/toml-f/toml-f
4-
revision = v0.2.2
4+
revision = v0.2.4

0 commit comments

Comments
 (0)