From e1579b90caf9ce5620c0627a678cd63f6a475532 Mon Sep 17 00:00:00 2001 From: rsanchez Date: Tue, 19 Nov 2024 14:15:37 +0100 Subject: [PATCH] COM-12579: * skip fluster workflow for the moment and add all steps to release.yml * include all previous steps as needs in create_release step --- .github/workflows/python-app.yml | 8 +-- .github/workflows/release.yml | 92 +++++++++++++++++++++++--------- 2 files changed, 73 insertions(+), 27 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 4b10556..b5d1f1a 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -4,10 +4,12 @@ name: fluster on: - push: - branches: [ master ] +# push: +# branches: +# - master # TODO add after testing pull_request: - branches: [ master ] + branches: + - master jobs: min_linux: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 29e2c4f..957ee74 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,22 +9,42 @@ on: description: 'Release version (e.g., 0.1.0)' required: true push: - branches: + branches: # TODO delete after testing - COM-12579 tags: - 'v*.*.*' jobs: - create_release: - name: Create and Test Release - runs-on: ubuntu-20.04 + min_linux: + name: linux with min supported deps + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.6 + uses: actions/setup-python@v5 + with: + python-version: 3.6 + - name: Install dependencies + run: | + make install_deps + sudo apt update && sudo apt install gstreamer1.0-tools gstreamer1.0-libav gstreamer1.0-plugins-bad ffmpeg vpx-tools + - name: Check + run: | + make check + - name: Test Build the wheel + run: | + pip wheel . + + linux: + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - - name: Set up Python 3.6 + - name: Set up Python 3.11 uses: actions/setup-python@v5 with: - python-version: 3.6 + python-version: 3.11 - name: Install dependencies run: | make install_deps @@ -35,22 +55,46 @@ jobs: - name: Test Build the wheel run: | pip wheel . - - name: Tag the commit - if: github.event_name == 'workflow_dispatch' - run: | - git config user.name "${{ github.actor }}" - git config user.email "${{ github.actor }}@users.noreply.github.com" - git tag v${{ github.event.inputs.version }} - git push origin v${{ github.event.inputs.version }} - - name: Create Release on GitHub - uses: actions/create-release@v1 + + windows: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.6 + uses: actions/setup-python@v5 with: - tag_name: v${{ github.event.inputs.version }} - release_name: Release v${{ github.event.inputs.version }} - body: | - Changelog: - - Feature 1 - - Feature 2 - - Bug fixes - draft: false - prerelease: false + python-version: 3.6 + - 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: Create Git Tag + run: | + git config user.name "github-actions" + git config user.email "github-actions@github.com" + git tag v${{ github.event.inputs.version }} + git push origin v${{ github.event.inputs.version }} + - name: Create GitHub Release + run: | + gh release create v${{ github.event.inputs.version }} \ + --title "Release v${{ github.event.inputs.version }}" \ + --notes "Changelog:\n- Added feature 1\n- Fixed issue 2" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}