Update GitHub Actions workflow to use actions/upload-artifact@v4 for … #18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Wheels | |
# Description: | |
# Sady it was not possible to create a pure-python package for this project | |
# The frame decompressor code is written in Rust, which adds additional | |
# complications to the build process and to packaging the project. | |
on: | |
push: | |
branches: | |
- main # Trigger on push to master branch | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, windows-2019, macos-11] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
default: true | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.17.0 | |
env: | |
CIBW_BEFORE_ALL_LINUX: "curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y" | |
CIBW_ENVIRONMENT: 'PATH="$PATH:$HOME/.cargo/bin"' | |
CIBW_PRERELEASE_PYTHONS: False | |
CIBW_SKIP: "*-win32 *-musllinux_*" | |
# ... | |
with: | |
package-dir: . | |
output-dir: wheelhouse | |
config-file: "{package}/pyproject.toml" | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: ./wheelhouse/*.whl | |
- uses: sarisia/actions-status-discord@v1 | |
if: always() | |
with: | |
webhook: ${{ secrets.DISCORD_WEBHOOK }} | |
status: ${{ job.status }} | |
content: | | |
${{ github.event_name == 'push' && format('Hey @here! A new commit was pushed to {0}!', github.repository) || '' }} | |
${{ github.event_name == 'pull_request' && format('Hey @here! A new pull request has been opened on {0}!', github.repository) || '' }} | |
${{ github.event_name == 'release' && format('Hey @here! A new release was created for project {0}!', github.event.repository.name) || '' }} | |
title: | | |
${{ github.event_name == 'push' && 'Push Notification' || '' }} | |
${{ github.event_name == 'pull_request' && 'Pull Request Notification' || '' }} | |
${{ github.event_name == 'release' && 'Release Notification' || '' }} | |
color: | | |
${{ github.event_name == 'push' && '0x00ff00' || '' }} | |
${{ github.event_name == 'pull_request' && '0xff0000' || '' }} | |
${{ github.event_name == 'release' && '0x0000ff' || '' }} | |
url: "${{ github.server_url }}/${{ github.repository }}" | |
username: GitHub Actions | |
avatar_url: "https://avatars.githubusercontent.com/u/19204702" |