mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:23:33 +00:00
fix: remove redundant Simple Release workflow
- Delete release-simple.yml (no longer needed) - Re-enable complex release.yml as main workflow (it works now!) - Fix GitHub Release creation by using GH_PAT token - Complex workflow now successfully builds all 7 platforms
This commit is contained in:
@@ -1,70 +0,0 @@
|
||||
name: Simple Release
|
||||
|
||||
# This is the main release workflow for @just-every/code
|
||||
# It builds native Linux binaries only (no cross-compilation)
|
||||
# The complex release.yml is disabled and only runs manually
|
||||
on:
|
||||
push:
|
||||
branches: [ code-release ]
|
||||
paths-ignore:
|
||||
- '.github/workflows/release.yml'
|
||||
- '.github/workflows/test.yml'
|
||||
- '*.md'
|
||||
|
||||
jobs:
|
||||
build-and-release:
|
||||
name: Build and Release
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Build native binaries
|
||||
run: |
|
||||
cd codex-rs
|
||||
cargo build --release --bin code --bin code-tui --bin code-exec
|
||||
|
||||
- name: Prepare npm package
|
||||
run: |
|
||||
# Copy binaries to codex-cli
|
||||
mkdir -p codex-cli/bin
|
||||
cp codex-rs/target/release/code codex-cli/bin/code-x86_64-unknown-linux-gnu
|
||||
cp codex-rs/target/release/code-tui codex-cli/bin/code-tui-x86_64-unknown-linux-gnu
|
||||
cp codex-rs/target/release/code-exec codex-cli/bin/code-exec-x86_64-unknown-linux-gnu
|
||||
chmod +x codex-cli/bin/*
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- name: Test npm package locally
|
||||
working-directory: codex-cli
|
||||
run: |
|
||||
# Create a simple test script to verify the package structure
|
||||
npm pack
|
||||
ls -la *.tgz
|
||||
tar -tzf *.tgz | head -20
|
||||
|
||||
- name: Check if NPM_TOKEN is configured
|
||||
id: check_npm
|
||||
run: |
|
||||
if [ -z "${{ secrets.NPM_TOKEN }}" ]; then
|
||||
echo "NPM_TOKEN not configured - skipping publish"
|
||||
echo "publish=false" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "NPM_TOKEN is configured - will publish"
|
||||
echo "publish=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Publish to npm
|
||||
if: steps.check_npm.outputs.publish == 'true'
|
||||
working-directory: codex-cli
|
||||
run: npm publish --access public
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}Triggering workflow by adding a comment
|
||||
@@ -1,16 +1,14 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
workflow_dispatch: # Only run manually, not on push
|
||||
# Disabled automatic triggers - use release-simple.yml instead
|
||||
# push:
|
||||
# branches: [ code-release ]
|
||||
# paths-ignore:
|
||||
# - '.github/workflows/test.yml'
|
||||
# - 'examples/**'
|
||||
# - '**/*.test.ts'
|
||||
# - 'test/**'
|
||||
# - '*.md'
|
||||
push:
|
||||
branches: [ code-release ]
|
||||
paths-ignore:
|
||||
- '.github/workflows/test.yml'
|
||||
- 'examples/**'
|
||||
- '**/*.test.ts'
|
||||
- 'test/**'
|
||||
- '*.md'
|
||||
|
||||
concurrency:
|
||||
group: ci-${{ github.ref }}
|
||||
@@ -208,4 +206,4 @@ jobs:
|
||||
files: |
|
||||
artifacts/binaries-*/*
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GH_PAT || secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user