Files
JIANT/.github/workflows/ports-release.yml
T
Claude 15f571e3c8 ports release: the plugins not offered, kept in one extras zip (plugins/); notes and announcement without them
Every ports-* release's plugin zips (MPC plugin, VST3 / LV2 / app) go into JIANT-FM-extras-<v>.zip under plugins/,
and the notes no longer name them: the plugins are to be sold (ECHO); README and the devices page already say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UVqsRpEnNJfjWWrH3C4opq
2026-11-24 13:06:00 +00:00

65 lines
3.1 KiB
YAML

# SPDX-License-Identifier: GPL-3.0-only
# JIANT beyond the FM-1, published: the ports' builds (ports.yml, the same jobs) attached to a GitHub pre-release
# tagged ports-<ports/RELEASE_VERSION>, its text ports/RELEASE.md. Runs when ports/RELEASE_VERSION changes on main,
# or by hand; a tag already released keeps its files and only takes ports/RELEASE.md's text again. The SMK-37 packages are not attached (not tried on hardware).
name: ports release
on:
workflow_dispatch:
push:
branches: [main]
paths: ["ports/RELEASE_VERSION", "ports/RELEASE.md", ".github/workflows/ports-release.yml"]
permissions:
contents: write
jobs:
version:
runs-on: ubuntu-24.04
outputs:
v: ${{ steps.v.outputs.v }}
steps:
- uses: actions/checkout@v4
- id: v
run: echo "v=$(tr -d ' \n' < ports/RELEASE_VERSION)" >> "$GITHUB_OUTPUT"
build:
needs: version
uses: ./.github/workflows/ports.yml
with:
release_version: ${{ needs.version.outputs.v }}
release:
needs: [version, build]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: dist
- name: the pre-release
env:
GH_TOKEN: ${{ github.token }}
V: ${{ needs.version.outputs.v }}
run: |
TAG="ports-$V"
# the plugins (MPC plugin, VST3 / LV2 / app) are not offered: kept, unnamed in the notes, inside one
# JIANT-FM-extras-<v>.zip under plugins/ (repack PLUGINS_DIR into it)
pack() { # $1: folder holding the plugin zips, $2: the extras zip to make
[ -n "$(ls "$1"/*.zip 2>/dev/null)" ] || return 1
rm -rf x && mkdir -p x/plugins && cp "$1"/*.zip x/plugins/ && (cd x && zip -qr "../$2" plugins)
}
# every ports-* release already out: its plugin zips into the extras zip, its notes ports/RELEASE.md
for T in $(gh release list --limit 100 --json tagName -q '.[].tagName' | grep '^ports-' || true); do
rm -rf old && mkdir -p old
gh release download "$T" -D old -p 'JIANT-FM-MPC-plugin-*' -p 'JIANT-FM-Linux-*' -p 'JIANT-FM-Windows-*' -p 'JIANT-FM-macOS-*' || true
if pack old "JIANT-FM-extras-${T#ports-}.zip"; then
gh release upload "$T" "JIANT-FM-extras-${T#ports-}.zip" --clobber
for f in old/*.zip; do gh release delete-asset "$T" "$(basename "$f")" -y; done
fi
gh release edit "$T" --notes-file ports/RELEASE.md
done
if gh release view "$TAG" >/dev/null 2>&1; then echo "$TAG already released: tidied"; exit 0; fi
mkdir -p up plug
find dist -name 'JIANT-FM-MPC-Sample-*.zip' -exec cp {} up/ \;
find dist \( -name 'JIANT-FM-MPC-plugin-*.zip' -o -name 'JIANT-FM-Linux*.zip' -o -name 'JIANT-FM-Windows*.zip' -o -name 'JIANT-FM-macOS*.zip' \) -exec cp {} plug/ \;
pack plug "up/JIANT-FM-extras-$V.zip" || true
ls -l up
gh release create "$TAG" up/*.zip --target "$GITHUB_SHA" --prerelease \
--title "JIANT FM beyond the FM-1 — $V (preview)" --notes-file ports/RELEASE.md