Skip to content

0.7.5

0.7.5 #16

Workflow file for this run

name: Release
on:
release:
types: [published]
jobs:
release-ubuntu:
name: Ubuntu release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout tags
shell: bash
run: |
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: 'pip'
cache-dependency-path: setup.py
- name: Install twine
run: |
python -m pip install --upgrade pip
pip install twine
- name: Build manylinux Python wheels
uses: RalfG/[email protected]_x86_64
with:
python-versions: 'cp36-cp36m cp37-cp37m cp38-cp38'
build-requirements: '-e . --verbose' # pip args
pre-build-command: 'git config --global --add safe.directory ${GITHUB_WORKSPACE}'
- name: Publish manylinux Python wheels
env:
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload --username __token__ dist/*-manylinux*.whl
release-osx:
name: MacOS release
runs-on: macOS-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout tags
shell: bash
run: |
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: 'pip'
cache-dependency-path: setup.py
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install -e .
# Only publish source package on one OS, to prevent PyPI file conflicts.
# Use MacOS rather than Windows to get LF rather than CRLF line endings
# (useful for Debian source packages), and MacOS rather than Linux, since
# the latter has a different build process.
- name: Build and publish wheel and source distribution
env:
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload --username __token__ dist/*.whl dist/*.tar.gz
gh release upload ${{ github.event.release.tag_name }} dist/*.tar.gz
release-windows:
name: Windows release
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout tags
shell: bash
run: |
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: 'pip'
cache-dependency-path: setup.py
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine pyinstaller
pip install -e .
- name: Build and publish wheel
env:
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py bdist_wheel
twine upload --username __token__ dist/*.whl
- name: Build and publish standalone executable
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pyinstaller nmlc.spec
$archive = "nml-standalone-${{ github.event.release.tag_name }}-win64.zip"
Compress-Archive -Path dist/nmlc.exe, LICENSE, README.md, docs/changelog.txt -DestinationPath $archive
gh release upload ${{ github.event.release.tag_name }} $archive