From 419bcea3d130f6b7e804cc8ec6b76d56cb83a141 Mon Sep 17 00:00:00 2001 From: Advait Paliwal Date: Wed, 15 Apr 2026 18:10:56 -0700 Subject: [PATCH] Prepare 0.2.18 release automation --- .github/workflows/publish.yml | 114 ++++++++++++------ README.md | 2 +- package-lock.json | 4 +- package.json | 2 +- scripts/install/install.ps1 | 2 +- scripts/install/install.sh | 2 +- website/public/install | 2 +- website/public/install.ps1 | 2 +- .../docs/getting-started/installation.md | 4 +- 9 files changed, 86 insertions(+), 48 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fc8100a..aa19f68 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,54 +5,93 @@ env: on: push: - branches: [main] + tags: + - "v*" workflow_dispatch: + inputs: + tag: + description: Existing git tag to publish and release (for example: v0.2.18) + required: true + type: string jobs: - version-check: - runs-on: blacksmith-4vcpu-ubuntu-2404 + verify: + runs-on: ubuntu-latest + permissions: + contents: read outputs: - version: ${{ steps.version.outputs.version }} - should_release: ${{ steps.version.outputs.should_release }} + tag: ${{ steps.meta.outputs.tag }} + version: ${{ steps.meta.outputs.version }} steps: - - uses: actions/checkout@v6 - - uses: actions/setup-node@v5 - with: - node-version: 24.14.0 - - id: version + - name: Resolve release metadata + id: meta shell: bash env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + INPUT_TAG: ${{ inputs.tag }} + REF_NAME: ${{ github.ref_name }} run: | - LOCAL=$(node -p "require('./package.json').version") - echo "version=$LOCAL" >> "$GITHUB_OUTPUT" - if gh release view "v$LOCAL" >/dev/null 2>&1; then - echo "should_release=false" >> "$GITHUB_OUTPUT" - else - echo "should_release=true" >> "$GITHUB_OUTPUT" - fi + TAG="${INPUT_TAG:-$REF_NAME}" + VERSION="${TAG#v}" + echo "tag=$TAG" >> "$GITHUB_OUTPUT" + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + - uses: actions/checkout@v6 + with: + ref: refs/tags/${{ steps.meta.outputs.tag }} + - uses: actions/setup-node@v6 + with: + node-version: 24 + registry-url: "https://registry.npmjs.org" + - run: npm ci + - name: Verify package version matches tag + shell: bash + run: | + ACTUAL="$(node -p "require('./package.json').version")" + EXPECTED="${{ steps.meta.outputs.version }}" + test "$ACTUAL" = "$EXPECTED" + - run: npm test + - run: npm pack + + publish-npm: + needs: verify + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v6 + with: + ref: refs/tags/${{ needs.verify.outputs.tag }} + - uses: actions/setup-node@v6 + with: + node-version: 24 + registry-url: "https://registry.npmjs.org" + - run: npm ci + - run: npm publish --provenance --access public build-native-bundles: - needs: version-check - if: needs.version-check.outputs.should_release == 'true' + needs: verify strategy: fail-fast: false matrix: include: - id: linux-x64 - os: blacksmith-4vcpu-ubuntu-2404 + os: ubuntu-latest - id: darwin-x64 os: macos-15-intel - id: darwin-arm64 os: macos-14 - id: win32-x64 - os: blacksmith-4vcpu-windows-2025 + os: windows-latest runs-on: ${{ matrix.os }} + permissions: + contents: read steps: - uses: actions/checkout@v6 - - uses: actions/setup-node@v5 with: - node-version: 24.14.0 + ref: refs/tags/${{ needs.verify.outputs.tag }} + - uses: actions/setup-node@v6 + with: + node-version: 24 - run: npm ci --ignore-scripts - run: npm run build - run: npm run build:native-bundle @@ -82,10 +121,9 @@ jobs: release-github: needs: - - version-check + - publish-npm - build-native-bundles - if: needs.version-check.outputs.should_release == 'true' && needs.build-native-bundles.result == 'success' - runs-on: blacksmith-4vcpu-ubuntu-2404 + runs-on: ubuntu-latest permissions: contents: write steps: @@ -93,22 +131,22 @@ jobs: with: path: release-assets merge-multiple: true - - shell: bash + - name: Create GitHub release + shell: bash env: GH_REPO: ${{ github.repository }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - VERSION: ${{ needs.version-check.outputs.version }} + TAG: ${{ needs.verify.outputs.tag }} run: | - if gh release view "v$VERSION" >/dev/null 2>&1; then - gh release upload "v$VERSION" release-assets/* --clobber - gh release edit "v$VERSION" \ - --title "v$VERSION" \ + if gh release view "$TAG" >/dev/null 2>&1; then + gh release upload "$TAG" release-assets/* --clobber + gh release edit "$TAG" \ + --title "$TAG" \ --notes "Standalone Feynman bundles for native installation." \ --draft=false \ - --target "$GITHUB_SHA" + --latest else - gh release create "v$VERSION" release-assets/* \ - --title "v$VERSION" \ - --notes "Standalone Feynman bundles for native installation." \ - --target "$GITHUB_SHA" + gh release create "$TAG" release-assets/* \ + --title "$TAG" \ + --notes "Standalone Feynman bundles for native installation." fi diff --git a/README.md b/README.md index d5d5aea..29c2fbb 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ curl -fsSL https://feynman.is/install | bash irm https://feynman.is/install.ps1 | iex ``` -The one-line installer fetches the latest tagged release. To pin a version, pass it explicitly, for example `curl -fsSL https://feynman.is/install | bash -s -- 0.2.17`. +The one-line installer fetches the latest tagged release. To pin a version, pass it explicitly, for example `curl -fsSL https://feynman.is/install | bash -s -- 0.2.18`. The installer downloads a standalone native bundle with its own Node.js runtime. diff --git a/package-lock.json b/package-lock.json index b37d398..0f772b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@companion-ai/feynman", - "version": "0.2.17", + "version": "0.2.18", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@companion-ai/feynman", - "version": "0.2.17", + "version": "0.2.18", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index e2da676..6478bd9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@companion-ai/feynman", - "version": "0.2.17", + "version": "0.2.18", "description": "Research-first CLI agent built on Pi and alphaXiv", "license": "MIT", "type": "module", diff --git a/scripts/install/install.ps1 b/scripts/install/install.ps1 index 3c8d398..7a7f6d0 100644 --- a/scripts/install/install.ps1 +++ b/scripts/install/install.ps1 @@ -110,7 +110,7 @@ This usually means the release exists, but not all platform bundles were uploade Workarounds: - try again after the release finishes publishing - pass the latest published version explicitly, e.g.: - & ([scriptblock]::Create((irm https://feynman.is/install.ps1))) -Version 0.2.16 + & ([scriptblock]::Create((irm https://feynman.is/install.ps1))) -Version 0.2.18 "@ } diff --git a/scripts/install/install.sh b/scripts/install/install.sh index caa09ed..0ddda73 100644 --- a/scripts/install/install.sh +++ b/scripts/install/install.sh @@ -261,7 +261,7 @@ This usually means the release exists, but not all platform bundles were uploade Workarounds: - try again after the release finishes publishing - pass the latest published version explicitly, e.g.: - curl -fsSL https://feynman.is/install | bash -s -- 0.2.16 + curl -fsSL https://feynman.is/install | bash -s -- 0.2.18 EOF exit 1 fi diff --git a/website/public/install b/website/public/install index caa09ed..0ddda73 100644 --- a/website/public/install +++ b/website/public/install @@ -261,7 +261,7 @@ This usually means the release exists, but not all platform bundles were uploade Workarounds: - try again after the release finishes publishing - pass the latest published version explicitly, e.g.: - curl -fsSL https://feynman.is/install | bash -s -- 0.2.16 + curl -fsSL https://feynman.is/install | bash -s -- 0.2.18 EOF exit 1 fi diff --git a/website/public/install.ps1 b/website/public/install.ps1 index 3c8d398..7a7f6d0 100644 --- a/website/public/install.ps1 +++ b/website/public/install.ps1 @@ -110,7 +110,7 @@ This usually means the release exists, but not all platform bundles were uploade Workarounds: - try again after the release finishes publishing - pass the latest published version explicitly, e.g.: - & ([scriptblock]::Create((irm https://feynman.is/install.ps1))) -Version 0.2.16 + & ([scriptblock]::Create((irm https://feynman.is/install.ps1))) -Version 0.2.18 "@ } diff --git a/website/src/content/docs/getting-started/installation.md b/website/src/content/docs/getting-started/installation.md index cfe2ed5..fb8d1b9 100644 --- a/website/src/content/docs/getting-started/installation.md +++ b/website/src/content/docs/getting-started/installation.md @@ -117,13 +117,13 @@ These installers download the bundled `skills/` and `prompts/` trees plus the re The one-line installer already targets the latest tagged release. To pin an exact version, pass it explicitly: ```bash -curl -fsSL https://feynman.is/install | bash -s -- 0.2.17 +curl -fsSL https://feynman.is/install | bash -s -- 0.2.18 ``` On Windows: ```powershell -& ([scriptblock]::Create((irm https://feynman.is/install.ps1))) -Version 0.2.17 +& ([scriptblock]::Create((irm https://feynman.is/install.ps1))) -Version 0.2.18 ``` ## Post-install setup