Skip to content

Release from refs/heads/hot/v0.10.1 #61

Release from refs/heads/hot/v0.10.1

Release from refs/heads/hot/v0.10.1 #61

Workflow file for this run

name: Release
run-name: Release from ${{ github.ref }}
on: [ workflow_dispatch ]
jobs:
build:
uses: ./.github/workflows/build.yaml
test-publish:
needs: build
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Retrieve distributions
uses: actions/download-artifact@v3
with:
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:
repository-url: https://test.pypi.org/legacy/
test-install:
needs: test-publish
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ "windows-latest", "ubuntu-latest", "macos-latest" ]
python-version: [ "3.9", "3.10", "3.11" ]
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install distribution from TestPyPI
run: pip install --pre --no-deps -i https://test.pypi.org/simple/ 6s-bin
- name: Install dependencies from PyPI
if: ${{ !contains(matrix.os, 'windows') }}
run: |
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') }}
run: |
$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') }}
run: >
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
run: python -m sixs_bin --test-wrapper