From fce8873fa7774c13fb29e6dc1e077e114c5af966 Mon Sep 17 00:00:00 2001 From: jakecooper Date: Thu, 8 Jan 2026 13:05:53 -0800 Subject: [PATCH] refactor: Move crates.io publish to release.yml for parallelization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - auto-release.yml now only handles: debounce, CI wait, version bump, tag push - release.yml handles all publishing in parallel: crates.io, npm, binaries This makes auto-release faster (~4 min instead of ~8 min) and allows publishing to run in parallel with binary builds. Flow: auto-release.yml: PR merge → debounce → bump → push tag ↓ release.yml: tag push → parallel jobs: ├── build binaries (matrix) ├── publish crates.io └── publish npm (OIDC) Co-Authored-By: Claude Opus 4.5 --- .github/workflows/auto-release.yml | 20 ++------------------ .github/workflows/release.yml | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 13ef25d82..b657a6815 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -214,21 +214,5 @@ jobs: git push origin master git push origin "v${{ steps.bump.outputs.version }}" - - name: Publish to crates.io - if: steps.check-release.outputs.skip != 'true' && steps.check-changes.outputs.has_changes == 'true' - env: - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - run: cargo publish - - - name: Setup Node.js for npm publish - if: steps.check-release.outputs.skip != 'true' && steps.check-changes.outputs.has_changes == 'true' - uses: actions/setup-node@v4 - with: - node-version: '20' - registry-url: 'https://registry.npmjs.org' - - - name: Publish to npm - if: steps.check-release.outputs.skip != 'true' && steps.check-changes.outputs.has_changes == 'true' - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npm publish --access public + # Publishing (crates.io, npm, binaries) is handled by release.yml + # which triggers on the tag push above diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 123d1fed3..f7b2c8625 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -183,9 +183,26 @@ jobs: run: | gh release upload "${{ needs.create-release.outputs.railway_version }}" "railway-${{ needs.create-release.outputs.railway_version }}-amd64.deb" + publish-crates: + name: Publish to crates.io + needs: ["create-release"] + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Publish to crates.io + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + run: cargo publish + publish-release: name: Publish Release - needs: ["create-release", "build-release"] + needs: ["create-release", "build-release", "publish-crates"] runs-on: ubuntu-latest steps: