From fbe8d1e06e528915e6c67392357e9b52d95ae99f Mon Sep 17 00:00:00 2001 From: Alexander Refsum Jensenius Date: Tue, 14 Apr 2026 07:32:35 +0200 Subject: [PATCH 1/5] Add GitHub Actions trusted publishing workflow for PyPI --- .github/workflows/pypi-publish.yml | 57 ++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/pypi-publish.yml diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml new file mode 100644 index 0000000..d92debb --- /dev/null +++ b/.github/workflows/pypi-publish.yml @@ -0,0 +1,57 @@ +name: Publish to PyPI + +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + +on: + release: + types: [published] + workflow_dispatch: + +permissions: + contents: read + +jobs: + build: + name: Build distribution artifacts + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: "3.12" + + - name: Install build tooling + run: python -m pip install --upgrade build + + - name: Build sdist and wheel + run: python -m build + + - name: Upload distribution artifacts + uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/ + + publish: + name: Publish package to PyPI + needs: build + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + environment: + name: pypi + url: https://pypi.org/p/musicalgestures + steps: + - name: Download distribution artifacts + uses: actions/download-artifact@v4 + with: + name: dist + path: dist/ + + - name: Publish to PyPI via trusted publishing + uses: pypa/gh-action-pypi-publish@release/v1 From f6e56b4483f0cac7c62accb47295946a2ac7612c Mon Sep 17 00:00:00 2001 From: Alexander Refsum Jensenius Date: Tue, 14 Apr 2026 07:38:47 +0200 Subject: [PATCH 2/5] Set Node 24 override in docs/test workflows --- .github/workflows/docs.yml | 3 +++ .github/workflows/test.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0660413..8ce4f2c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,5 +1,8 @@ name: Deploy Documentation +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + on: push: branches: [ master ] diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b213723..e8508e2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,8 @@ name: Run Test with Pytest +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + on: [push] jobs: From 9462c02e724c96236220cf88a8ec142a173597dd Mon Sep 17 00:00:00 2001 From: Alexander Refsum Jensenius Date: Tue, 14 Apr 2026 07:44:26 +0200 Subject: [PATCH 3/5] Run legacy test workflow manually only --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e8508e2..0bae23d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,7 +3,8 @@ name: Run Test with Pytest env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true -on: [push] +on: + workflow_dispatch: jobs: build: From 27321122e8cedbcb1bcd616066f9bf3128644910 Mon Sep 17 00:00:00 2001 From: Alexander Refsum Jensenius Date: Tue, 14 Apr 2026 21:36:25 +0200 Subject: [PATCH 4/5] Replace deprecated FFmpeg action in legacy test workflow --- .github/workflows/test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0bae23d..48d0174 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,8 +33,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Install FFmpeg and FFprobe - uses: FedericoCarboni/setup-ffmpeg@v3 - id: setup-ffmpeg + run: | + sudo apt-get update + sudo apt-get install -y ffmpeg - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 From 51b4cdfd0b8c6e2ec8706bd4f7e10b891194378d Mon Sep 17 00:00:00 2001 From: Alexander Refsum Jensenius Date: Tue, 14 Apr 2026 22:04:56 +0200 Subject: [PATCH 5/5] Remove redundant legacy test workflow --- .github/workflows/test.yml | 60 -------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 48d0174..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: Run Test with Pytest - -env: - FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true - -on: - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.10"] - - steps: - - uses: actions/checkout@v6 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 - with: - python-version: ${{ matrix.python-version }} - - - name: Update documentation files - run: | - pip install handsdown==1.1.0 - handsdown --external https://github.com/fourMs/MGT-python --branch master - - - uses: stefanzweifel/git-auto-commit-action@v7 - with: - commit_message: Update documentation - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Install FFmpeg and FFprobe - run: | - sudo apt-get update - sudo apt-get install -y ffmpeg - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 - with: - python-version: ${{ matrix.python-version }} - - - name: Install musicalgestures - shell: bash -l {0} - run: python -m pip install musicalgestures - - - name: Lint with Ruff - run: | - pip install ruff - ruff --output-format=github - continue-on-error: true - - ########## TODO ############ - # - name: Test with pytest - # shell: bash -l {0} - # run: | - # pip install pytest - # python -m pytest -v \ No newline at end of file