release #34
Workflow file for this run
This file contains 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
# This workflow will create ant test a new release | |
name: release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Release version (e.g., 0.1.0)' | |
required: true | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
min_linux: | |
name: linux with min supported deps | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.7 | |
- name: Install dependencies | |
run: | | |
make install_deps | |
sudo apt update && sudo apt install \ | |
git \ | |
cmake \ | |
gcc-multilib \ | |
g++-multilib \ | |
gstreamer1.0-tools \ | |
gstreamer1.0-libav \ | |
gstreamer1.0-plugins-bad \ | |
ffmpeg \ | |
vpx-tools \ | |
aom-tools \ | |
wget \ | |
unzip | |
- name: Check | |
run: | | |
make check | |
- name: Test Build the wheel | |
run: | | |
pip wheel . | |
- name: Build all reference decoders | |
run: | | |
make all_reference_decoders | |
- name: Clean up | |
run: | | |
make clean | |
linux: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.13 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.13 | |
- name: Install dependencies | |
run: | | |
make install_deps | |
sudo apt update && sudo apt install \ | |
git \ | |
cmake \ | |
gcc-multilib \ | |
g++-multilib \ | |
gstreamer1.0-tools \ | |
gstreamer1.0-libav \ | |
gstreamer1.0-plugins-bad \ | |
ffmpeg \ | |
vpx-tools \ | |
aom-tools \ | |
wget \ | |
unzip | |
- name: Check | |
run: | | |
make check | |
- name: Test Build the wheel | |
run: | | |
pip wheel . | |
- name: Build all reference decoders | |
run: | | |
make all_reference_decoders | |
- name: Clean up | |
run: | | |
make clean | |
windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.7 | |
- name: Install dependencies | |
run: | | |
make install_deps | |
- name: Check | |
run: | | |
make check | |
- name: Test Build the wheel | |
run: | | |
pip wheel . | |
create_release: | |
name: Create Release | |
runs-on: ubuntu-20.04 | |
needs: | |
- min_linux | |
- linux | |
- windows | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Determine version | |
id: get_version | |
run: | | |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then | |
VERSION=${{ github.event.inputs.version }} | |
else | |
VERSION=${{ github.ref_name }} | |
VERSION=${VERSION#v} | |
fi | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- name: Extract release notes from CHANGELOG.md | |
id: extract_notes | |
run: | | |
VERSION=${{ env.VERSION }} | |
if ! grep -q "## \\[$VERSION\\]" CHANGELOG.md; then | |
echo "Release notes for version $VERSION not found in CHANGELOG.md" | |
exit 1 | |
fi | |
NOTES=$(awk "/## \\[$VERSION\\]/ {flag=1; next} /^## \\[/ {flag=0} flag" CHANGELOG.md | sed '/^$/d') | |
echo "NOTES<<EOF" >> $GITHUB_ENV | |
echo "$NOTES" >> $GITHUB_ENV | |
echo "EOF" >> $GITHUB_ENV | |
- name: Create Git Tag | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
run: | | |
git config user.name "github-actions" | |
git config user.email "[email protected]" | |
git tag v${{ env.VERSION }} | |
git push origin v${{ env.VERSION }} | |
- name: Create GitHub Release | |
run: | | |
VERSION=${{ env.VERSION }} | |
gh release create v$VERSION \ | |
--title "Release v$VERSION" \ | |
--notes "$NOTES" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |