Skip to content

Python Package Build and Release #10

Python Package Build and Release

Python Package Build and Release #10

Workflow file for this run

# YAML schema for GitHub Actions:
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions
#
# Helpful YAML parser to clarify YAML syntax:
# https://yaml-online-parser.appspot.com/
#
# This workflow will run at the end of every day to
# 1. Build Python Wheel
# 2. Upload Release Asset
name: Python Package Build and Release
on:
workflow_dispatch: # Allow manual triggers
schedule:
- cron: "0 0 * * *" # 12am UTC (5pm PST)
jobs:
build_python_package:
name: Build Python Wheel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install python-build and twine
run: |
python -m pip install --upgrade pip
python -m pip install build twine wheel
python -m pip list
- name: Build the wheel
run: |
python setup.py bdist_wheel
- name: Verify the distribution
run: twine check --strict dist/*
- name: List the contents of the wheel
run: python -m zipfile --list dist/*.whl
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')"
- name: Upload Release Asset
uses: softprops/[email protected]
with:
files: dist/*.whl
prerelease: true
tag_name: nightly-tag-${{ steps.date.outputs.date }}