From 74fba4a396679d67f806354037be69f691ee5886 Mon Sep 17 00:00:00 2001 From: Artist-MOBAI Date: Mon, 25 May 2026 03:39:30 +0800 Subject: [PATCH 1/2] feat: add support for extra artifacts in release process --- .../blocks/build-makefile-dylib/action.yml | 28 +++++++++++++++++++ .github/workflows/makefile-dylib-release.yml | 6 ++++ 2 files changed, 34 insertions(+) diff --git a/.github/blocks/build-makefile-dylib/action.yml b/.github/blocks/build-makefile-dylib/action.yml index aae1feb..008ed22 100644 --- a/.github/blocks/build-makefile-dylib/action.yml +++ b/.github/blocks/build-makefile-dylib/action.yml @@ -9,6 +9,10 @@ inputs: required: false default: '' description: "Version to embed (passed as VERSION= to make)" + extra-artifacts: + required: false + default: '' + description: "Newline-separated list of additional build outputs (paths relative to repo root) to attach to the release. Each path is copied into artifacts/ alongside the dylib." runs: using: "composite" @@ -32,6 +36,30 @@ runs: - name: Prepare artifact shell: bash + env: + EXTRA_ARTIFACTS: ${{ inputs.extra-artifacts }} run: | mkdir -p artifacts cp "build/${{ inputs.output-name }}.dylib" artifacts/ + + if [ -n "$EXTRA_ARTIFACTS" ]; then + while IFS= read -r raw; do + # strip leading/trailing whitespace + extra="${raw#"${raw%%[![:space:]]*}"}" + extra="${extra%"${extra##*[![:space:]]}"}" + + # skip blank lines and comments + if [ -z "$extra" ] || [ "${extra#\#}" != "$extra" ]; then + continue + fi + + if [ ! -f "$extra" ]; then + echo "::error::extra artifact '$extra' not found — build failure" + exit 1 + fi + + echo "Including extra artifact: $extra" + file "$extra" + cp "$extra" artifacts/ + done <<< "$EXTRA_ARTIFACTS" + fi diff --git a/.github/workflows/makefile-dylib-release.yml b/.github/workflows/makefile-dylib-release.yml index eab8c3d..d9930cb 100644 --- a/.github/workflows/makefile-dylib-release.yml +++ b/.github/workflows/makefile-dylib-release.yml @@ -11,6 +11,11 @@ on: required: false default: false description: "Opt in to Blacksmith Linux runners (blacksmith-4vcpu-ubuntu-2404). Requires the Blacksmith GitHub App installed on the caller org. Defaults to ubuntu-latest." + extra-artifacts: + type: string + required: false + default: '' + description: "Newline-separated list of extra build outputs (relative to repo root) to attach to the release alongside the dylib." secrets: OPENAI_API_KEY: required: true @@ -60,6 +65,7 @@ jobs: with: output-name: ${{ inputs.dylib-name }} version: ${{ needs.prepare-release.outputs.version }} + extra-artifacts: ${{ inputs.extra-artifacts }} - uses: actions/upload-artifact@v4 with: name: ${{ inputs.dylib-name }} From ece43775d9840b8c02325128b14ec6e53f75fa83 Mon Sep 17 00:00:00 2001 From: Artist-MOBAI Date: Tue, 26 May 2026 01:12:06 +0800 Subject: [PATCH 2/2] refactor: remove support for extra artifacts in build process This commit removes the `extra-artifacts` input and related logic from the build-makefile-dylib action and the makefile-dylib-release workflow. The changes streamline the release process by eliminating unnecessary complexity associated with handling additional build outputs. --- .../blocks/build-makefile-dylib/action.yml | 28 ------------------- .github/workflows/makefile-dylib-release.yml | 6 ---- 2 files changed, 34 deletions(-) diff --git a/.github/blocks/build-makefile-dylib/action.yml b/.github/blocks/build-makefile-dylib/action.yml index 008ed22..aae1feb 100644 --- a/.github/blocks/build-makefile-dylib/action.yml +++ b/.github/blocks/build-makefile-dylib/action.yml @@ -9,10 +9,6 @@ inputs: required: false default: '' description: "Version to embed (passed as VERSION= to make)" - extra-artifacts: - required: false - default: '' - description: "Newline-separated list of additional build outputs (paths relative to repo root) to attach to the release. Each path is copied into artifacts/ alongside the dylib." runs: using: "composite" @@ -36,30 +32,6 @@ runs: - name: Prepare artifact shell: bash - env: - EXTRA_ARTIFACTS: ${{ inputs.extra-artifacts }} run: | mkdir -p artifacts cp "build/${{ inputs.output-name }}.dylib" artifacts/ - - if [ -n "$EXTRA_ARTIFACTS" ]; then - while IFS= read -r raw; do - # strip leading/trailing whitespace - extra="${raw#"${raw%%[![:space:]]*}"}" - extra="${extra%"${extra##*[![:space:]]}"}" - - # skip blank lines and comments - if [ -z "$extra" ] || [ "${extra#\#}" != "$extra" ]; then - continue - fi - - if [ ! -f "$extra" ]; then - echo "::error::extra artifact '$extra' not found — build failure" - exit 1 - fi - - echo "Including extra artifact: $extra" - file "$extra" - cp "$extra" artifacts/ - done <<< "$EXTRA_ARTIFACTS" - fi diff --git a/.github/workflows/makefile-dylib-release.yml b/.github/workflows/makefile-dylib-release.yml index d9930cb..eab8c3d 100644 --- a/.github/workflows/makefile-dylib-release.yml +++ b/.github/workflows/makefile-dylib-release.yml @@ -11,11 +11,6 @@ on: required: false default: false description: "Opt in to Blacksmith Linux runners (blacksmith-4vcpu-ubuntu-2404). Requires the Blacksmith GitHub App installed on the caller org. Defaults to ubuntu-latest." - extra-artifacts: - type: string - required: false - default: '' - description: "Newline-separated list of extra build outputs (relative to repo root) to attach to the release alongside the dylib." secrets: OPENAI_API_KEY: required: true @@ -65,7 +60,6 @@ jobs: with: output-name: ${{ inputs.dylib-name }} version: ${{ needs.prepare-release.outputs.version }} - extra-artifacts: ${{ inputs.extra-artifacts }} - uses: actions/upload-artifact@v4 with: name: ${{ inputs.dylib-name }}