From 69a1139eb3cc860dd391781df56c54919d4ddccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Sun, 5 Apr 2026 21:23:18 -0400 Subject: [PATCH] Add remote Boss workflow used by automated release script --- .github/workflows/remote-boss-platforms.yml | 75 +++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .github/workflows/remote-boss-platforms.yml diff --git a/.github/workflows/remote-boss-platforms.yml b/.github/workflows/remote-boss-platforms.yml new file mode 100644 index 00000000..b5966c57 --- /dev/null +++ b/.github/workflows/remote-boss-platforms.yml @@ -0,0 +1,75 @@ +name: Remote Boss Platforms + +on: + workflow_dispatch: + inputs: + version: + description: Boss build version + required: true + type: string + release_tag: + description: Draft GitHub release tag used as the Boss transport bucket + required: true + type: string + release_title: + description: Human-readable title for the draft release + required: false + type: string + +concurrency: + group: remote-boss-${{ github.ref }}-${{ inputs.release_tag }} + cancel-in-progress: false + +env: + PNPM_VERSION: "10.24.0" + NODE_VERSION: "22" + +jobs: + build-windows: + name: Boss Windows Installer + runs-on: windows-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + with: + version: ${{ env.PNPM_VERSION }} + - uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + cache: pnpm + - run: pnpm install --frozen-lockfile + - name: Build Boss edition + run: node boss-build/build-boss-edition.mjs --platform=win --version=${{ inputs.version }} + shell: bash + env: + CSC_LINK: ${{ secrets.WIN_CERTIFICATE_P12_BASE64 }} + CSC_KEY_PASSWORD: ${{ secrets.WIN_CERTIFICATE_PASSWORD }} + - name: Upload release files + shell: bash + env: + GH_TOKEN: ${{ github.token }} + RELEASE_TAG: ${{ inputs.release_tag }} + RELEASE_TITLE: ${{ inputs.release_title }} + run: | + set -euo pipefail + gh release view "$RELEASE_TAG" >/dev/null 2>&1 || \ + gh release create "$RELEASE_TAG" \ + --draft \ + --prerelease \ + --title "${RELEASE_TITLE:-Boss Release $GITHUB_RUN_ID}" \ + --notes "Temporary Boss transport generated by remote-boss-platforms.yml." \ + --target "$GITHUB_SHA" + + shopt -s nullglob + files=( + boss-build/build/out/*.exe + boss-build/build/out/*.blockmap + ) + if [ ${#files[@]} -eq 0 ]; then + echo "No Boss Windows release files found." + exit 1 + fi + + gh release upload "$RELEASE_TAG" "${files[@]}" --clobber