Skip to content

Build and Publish GH+PyPi #4

Build and Publish GH+PyPi

Build and Publish GH+PyPi #4

Workflow file for this run

name: Build and Publish
on:
workflow_dispatch:
permissions:
contents: write
discussions: write
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
CIBW_PYPY_VERSION: "7.3.10*"
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macos-11]
steps:
- uses: actions/checkout@v4
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Set up Environment
run: echo "CIBW_SKIP=pp36-* pp37-*" >> $GITHUB_ENV
- name: Check ENV
if: matrix.os == 'ubuntu-20.04'
run: echo $PATH
- name: Build wheels Linux
if: matrix.os == 'ubuntu-20.04'
uses: pypa/[email protected]
- name: Build wheels Mac
if: matrix.os == 'macos-11'
uses: pypa/[email protected]
- name: Build wheels Windows
if: matrix.os == 'windows-2019'
uses: pypa/[email protected]
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
Release:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
body: |
Please read the [CHANGELOG](https://github.com/LUCIT-Systems-and-Development/unicorn-binance-rest-api/blob/main/CHANGELOG.md) for further information.
discussion_category_name: releases
draft: false
files: |
dist/*.tar.gz
dist/*.whl
generate_release_notes: true
name: unicorn-binance-rest-api
prerelease: false
tag_name: 2.0.2
token: ${{ secrets.PYPI_TOKEN }}