From 75781c4c5a64d86a3773d646885b253e0c98d9a2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 17 May 2026 13:25:13 +0000 Subject: [PATCH 1/5] chore: update actions/setup-python to v5 in tests.yml Agent-Logs-Url: https://github.com/jeremytrimble/specview/sessions/8dee06ee-8229-4bf0-97dc-df73db122800 Co-authored-by: jeremytrimble <1209303+jeremytrimble@users.noreply.github.com> --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 832afdb..ba5bd79 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.12 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.12" From aee52488021e66ab4d65125d42580825172cb0ca Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 17 May 2026 13:26:49 +0000 Subject: [PATCH 2/5] feat: restructure build.yml into build-binary, build-wheel, and release jobs Agent-Logs-Url: https://github.com/jeremytrimble/specview/sessions/8dee06ee-8229-4bf0-97dc-df73db122800 Co-authored-by: jeremytrimble <1209303+jeremytrimble@users.noreply.github.com> --- .github/workflows/build.yml | 95 +++++++++++++++++++++++++++++++++---- 1 file changed, 87 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a4f3585..c1bd93f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,16 +1,35 @@ -name: Build Specview Executables +name: Build and Release Specview on: push: tags: - 'v*' # Trigger on version tags like v1.0.0 +permissions: + contents: write # needed to create GitHub releases + jobs: - build: + build-binary: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04, macos-latest, windows-latest] #, windows-11-arm] + include: + - os: ubuntu-22.04 + platform: linux + binary_src: dist/specview + binary_dst_suffix: linux + binary_ext: "" + - os: macos-latest + platform: macos + binary_src: dist/specview + binary_dst_suffix: macos + binary_ext: "" + - os: windows-latest + platform: windows + binary_src: dist/specview.exe + binary_dst_suffix: windows + binary_ext: ".exe" + steps: - name: Checkout code uses: actions/checkout@v4 @@ -19,7 +38,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.12' - + - name: Install uv (Unix) if: runner.os != 'Windows' run: | @@ -36,9 +55,69 @@ jobs: uv sync --group build --group dev uv run poe build-pyinstaller - - name: Upload executable artifact + - name: Rename binary with version and platform + shell: bash + run: | + VERSION="${{ github.ref_name }}" + VERSION="${VERSION#v}" # strip leading 'v' + BINARY_NAME="specview-${VERSION}-${{ matrix.binary_dst_suffix }}${{ matrix.binary_ext }}" + mv "${{ matrix.binary_src }}" "dist/${BINARY_NAME}" + echo "BINARY_NAME=${BINARY_NAME}" >> $GITHUB_ENV + + - name: Upload binary artifact uses: actions/upload-artifact@v4 with: - name: specview-${{ runner.os }} - path: | - dist/* + name: specview-binary-${{ matrix.platform }} + path: dist/${{ env.BINARY_NAME }} + + build-wheel: + runs-on: ubuntu-22.04 + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install uv + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + + - name: Build wheel + run: | + uv build + + - name: Upload wheel artifact + uses: actions/upload-artifact@v4 + with: + name: specview-wheel + path: dist/*.whl + + release: + needs: [build-binary, build-wheel] + runs-on: ubuntu-22.04 + + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: release-assets + # merge-multiple flattens all artifacts into one directory; filenames are + # unique by design (platform suffix on binaries, package name on the wheel). + merge-multiple: true + + - name: Create GitHub Release + env: + GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }} + run: | + # Create the release; if it already exists (e.g. workflow re-run), upload + # the files to the existing release instead. + gh release create "${{ github.ref_name }}" \ + --title "Release ${{ github.ref_name }}" \ + --generate-notes \ + release-assets/* \ + || gh release upload "${{ github.ref_name }}" release-assets/* --clobber From eb69a6b2ca11212809f8d0c055f68a67f8ea9bf1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 17 May 2026 13:28:13 +0000 Subject: [PATCH 3/5] fix: pin actions/download-artifact to v4.1.3 to fix arbitrary file write vulnerability Agent-Logs-Url: https://github.com/jeremytrimble/specview/sessions/8dee06ee-8229-4bf0-97dc-df73db122800 Co-authored-by: jeremytrimble <1209303+jeremytrimble@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c1bd93f..1a30199 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -102,7 +102,7 @@ jobs: steps: - name: Download all artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v4.1.3 with: path: release-assets # merge-multiple flattens all artifacts into one directory; filenames are From f6c0311bb66afbc92573ea83e4b4c277afebdd09 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 17 May 2026 13:35:58 +0000 Subject: [PATCH 4/5] fix: rename internal artifacts from specview-binary-* to specview-* Agent-Logs-Url: https://github.com/jeremytrimble/specview/sessions/f3316ccc-4c23-4d89-b929-ff6b52e3d845 Co-authored-by: jeremytrimble <1209303+jeremytrimble@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1a30199..afe1bc3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,7 +67,7 @@ jobs: - name: Upload binary artifact uses: actions/upload-artifact@v4 with: - name: specview-binary-${{ matrix.platform }} + name: specview-${{ matrix.platform }} path: dist/${{ env.BINARY_NAME }} build-wheel: From 6201a214e2a3fb76b67c6abde30c64503b6898a7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 17 May 2026 16:13:43 +0000 Subject: [PATCH 5/5] feat: add workflow_dispatch trigger with version input for manual test runs Agent-Logs-Url: https://github.com/jeremytrimble/specview/sessions/d284cf87-67fa-4fe2-ae2d-6e5cb6b71276 Co-authored-by: jeremytrimble <1209303+jeremytrimble@users.noreply.github.com> --- .github/workflows/build.yml | 40 ++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index afe1bc3..50be919 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,12 +4,36 @@ on: push: tags: - 'v*' # Trigger on version tags like v1.0.0 + workflow_dispatch: + inputs: + version: + description: 'Version tag for the release (e.g. v0.2.0-test). A pre-release will be created with this name.' + required: true + default: 'v0.0.0-test' permissions: contents: write # needed to create GitHub releases jobs: + setup: + runs-on: ubuntu-22.04 + outputs: + release_tag: ${{ steps.get-tag.outputs.release_tag }} + prerelease: ${{ steps.get-tag.outputs.prerelease }} + steps: + - name: Determine release tag + id: get-tag + run: | + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + echo "release_tag=${{ inputs.version }}" >> $GITHUB_OUTPUT + echo "prerelease=true" >> $GITHUB_OUTPUT + else + echo "release_tag=${{ github.ref_name }}" >> $GITHUB_OUTPUT + echo "prerelease=false" >> $GITHUB_OUTPUT + fi + build-binary: + needs: [setup] runs-on: ${{ matrix.os }} strategy: matrix: @@ -58,7 +82,7 @@ jobs: - name: Rename binary with version and platform shell: bash run: | - VERSION="${{ github.ref_name }}" + VERSION="${{ needs.setup.outputs.release_tag }}" VERSION="${VERSION#v}" # strip leading 'v' BINARY_NAME="specview-${VERSION}-${{ matrix.binary_dst_suffix }}${{ matrix.binary_ext }}" mv "${{ matrix.binary_src }}" "dist/${BINARY_NAME}" @@ -97,7 +121,7 @@ jobs: path: dist/*.whl release: - needs: [build-binary, build-wheel] + needs: [setup, build-binary, build-wheel] runs-on: ubuntu-22.04 steps: @@ -114,10 +138,16 @@ jobs: GH_TOKEN: ${{ github.token }} GH_REPO: ${{ github.repository }} run: | + RELEASE_TAG="${{ needs.setup.outputs.release_tag }}" + PRERELEASE_FLAG="" + if [ "${{ needs.setup.outputs.prerelease }}" = "true" ]; then + PRERELEASE_FLAG="--prerelease" + fi # Create the release; if it already exists (e.g. workflow re-run), upload # the files to the existing release instead. - gh release create "${{ github.ref_name }}" \ - --title "Release ${{ github.ref_name }}" \ + gh release create "${RELEASE_TAG}" \ + --title "Release ${RELEASE_TAG}" \ --generate-notes \ + ${PRERELEASE_FLAG} \ release-assets/* \ - || gh release upload "${{ github.ref_name }}" release-assets/* --clobber + || gh release upload "${RELEASE_TAG}" release-assets/* --clobber