Skip to content

Add branch for testing #1

Add branch for testing

Add branch for testing #1

Workflow file for this run

name: Nightly Publish
on:
push:
branches: [main, cte/nightly-ci]
workflow_dispatch: # Allows manual triggering.
env:
NODE_VERSION: 20.18.1
PNPM_VERSION: 10.8.1
jobs:
publish-nightly:
runs-on: ubuntu-latest
permissions:
contents: read # No tags pushed → read is enough.
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Count commits
id: count
run: echo "total=$(git rev-list --count HEAD)" >> $GITHUB_OUTPUT
- name: Patch package.json version
env:
COMMIT_COUNT: ${{ steps.count.outputs.total }}
run: |
node <<'EOF'
const fs = require('fs');
const pkg = JSON.parse(fs.readFileSync('apps/vscode-nightly/package.json','utf8'));
const [maj, min] = pkg.version.split('.');
pkg.version = `${maj}.${min}.${process.env.COMMIT_COUNT}`;
fs.writeFileSync('apps/vscode-nightly/package.json', JSON.stringify(pkg, null, 2));
console.log(`🔖 Nightly version set to ${pkg.version}`);
EOF
- name: Build VSIX
run: pnpm build:nightly # Produces bin/roo-code-nightly-0.0.[count].vsix
- name: Publish to VS Code Marketplace (Nightly channel)
env:
VSCE_PAT: ${{ secrets.VSCE_PAT_NIGHTLY }}
run: echo npx vsce publish --pre-release --packagePath "bin/$(/bin/ls bin | head -n1)"
- name: Publish to Open VSX
env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}
run: echo npx ovsx publish "bin/$(ls bin | head -n1)" --pre-release