Skip to content

Commit

Permalink
Merge branch 'hot/v0.10.1' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
brianschubert committed Dec 29, 2023
2 parents eb20787 + 696314a commit e9af040
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Release

run-name: Release from ${{ github.ref }}

on: [ workflow_dispatch ]

jobs:
Expand All @@ -20,6 +22,12 @@ jobs:
name: dist-release
path: dist

# # Allow the same distribution version to be test-published multiple times.
# # Useful for prototyping the release process.
# - name: Rename wheels with build number
# # language=sh
# run: for file in dist/*.whl; do mv "$file" "${file//py3/${{ github.run_number }}-py3}"; done

- name: Publish distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand All @@ -43,30 +51,33 @@ jobs:

- name: Install distribution from TestPyPI
# language=sh
run: pip install --no-deps -i https://test.pypi.org/simple/ 6s-bin
run: pip install --pre --no-deps -i https://test.pypi.org/simple/ 6s-bin

- name: Install dependencies from PyPI
if: ${{ !contains(matrix.os, 'windows') }}
# language=sh
run: |
python -m pip install '6s-bin[wrapper]' | tee /dev/tty | grep 'Requirement already satisfied: 6s-bin' > /dev/null
python -m pip install '6s-bin[wrapper]' packaging | tee /dev/tty | grep 'Requirement already satisfied: 6s-bin' > /dev/null
- name: Install dependencies from PyPI (Windows)
if: ${{ contains(matrix.os, 'windows') }}
# language=sh
run: |
$output = python -m pip install '6s-bin[wrapper]' | Out-String
$output = python -m pip install '6s-bin[wrapper]' packaging | Out-String
Write-Host $output
exit [int]$($output -notmatch 'Requirement already satisfied: 6s-bin')
- name: Verify that installed distribution version matches tag
# TODO find fix for double-quotes being stripped when the below command is run in PowerShell.
if: ${{ !contains(matrix.os, 'windows') }}
# language=sh
run: >
python -c 'import sixs_bin;
expected_ref = f"refs/tags/v{sixs_bin.__version__}";
actual_ref="${{ github.ref }}";
print(f"{expected_ref=} {actual_ref=}");
assert expected_ref == actual_ref
python -c 'import packaging.version;
import sixs_bin;
installed_version = packaging.version.parse(sixs_bin.__version__);
expected_version = packaging.version.parse("${{ github.ref }}".split("/")[-1].removeprefix("v"));
print(f"{installed_version=} {expected_version=}");
assert installed_version.release == expected_version.release
'
- name: Run wrapper test
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "6s-bin"
version = "0.10.0-dev"
version = "0.11.0-dev"
description = "Compiled binaries for the 6S Radiative Transfer Model exposed as package resources."
license = "Apache-2.0"
authors = ["Brian Schubert <schubert.b@northeastern.edu>"]
Expand Down

0 comments on commit e9af040

Please sign in to comment.