|
1 | 1 | name: Nightly Publish |
2 | 2 |
|
3 | 3 | on: |
4 | | - push: |
5 | | - branches: [main] |
6 | | - workflow_dispatch: # Allows manual triggering. |
| 4 | + # Temporarily disabled automatic nightly publishes on pushes to main. |
| 5 | + workflow_dispatch: # Allows manual triggering. |
7 | 6 |
|
8 | 7 | jobs: |
9 | | - publish-nightly: |
10 | | - runs-on: ubuntu-latest |
| 8 | + publish-nightly: |
| 9 | + runs-on: ubuntu-latest |
11 | 10 |
|
12 | | - permissions: |
13 | | - contents: read # No tags pushed → read is enough. |
| 11 | + permissions: |
| 12 | + contents: read # No tags pushed → read is enough. |
14 | 13 |
|
15 | | - steps: |
16 | | - - name: Checkout code |
17 | | - uses: actions/checkout@v4 |
18 | | - with: |
19 | | - fetch-depth: 0 |
20 | | - - name: Setup Node.js and pnpm |
21 | | - uses: ./.github/actions/setup-node-pnpm |
22 | | - with: |
23 | | - install-args: '--frozen-lockfile' |
24 | | - - name: Forge numeric Nightly version |
25 | | - id: version |
26 | | - env: |
27 | | - RUN_NUMBER: ${{ github.run_number }} |
28 | | - run: echo "number=$(( 5500 + ${RUN_NUMBER} ))" >> $GITHUB_OUTPUT |
29 | | - - name: Patch package.json version |
30 | | - env: |
31 | | - VERSION_NUMBER: ${{ steps.version.outputs.number }} |
32 | | - run: | |
33 | | - node <<'EOF' |
34 | | - const fs = require('fs'); |
35 | | - const path = require('path'); |
36 | | - const pkgPath = path.join(__dirname, 'apps', 'vscode-nightly', 'package.nightly.json'); |
37 | | - const pkg = JSON.parse(fs.readFileSync(pkgPath,'utf8')); |
38 | | - const [maj, min] = pkg.version.split('.'); |
39 | | - pkg.version = `${maj}.${min}.${process.env.VERSION_NUMBER}`; |
40 | | - fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2)); |
41 | | - console.log(`🔖 Nightly version set to ${pkg.version}`); |
42 | | - EOF |
43 | | - - name: Build VSIX |
44 | | - run: pnpm vsix:nightly # Produces bin/roo-code-nightly-0.0.[count].vsix |
45 | | - - name: Publish to VS Code Marketplace |
46 | | - env: |
47 | | - VSCE_PAT: ${{ secrets.VSCE_PAT }} |
48 | | - run: npx vsce publish --packagePath "bin/$(/bin/ls bin | head -n1)" |
49 | | - - name: Publish to Open VSX Registry |
50 | | - env: |
51 | | - OVSX_PAT: ${{ secrets.OVSX_PAT }} |
52 | | - run: npx ovsx publish "bin/$(ls bin | head -n1)" |
| 14 | + steps: |
| 15 | + - name: Checkout code |
| 16 | + uses: actions/checkout@v4 |
| 17 | + with: |
| 18 | + fetch-depth: 0 |
| 19 | + - name: Setup Node.js and pnpm |
| 20 | + uses: ./.github/actions/setup-node-pnpm |
| 21 | + with: |
| 22 | + install-args: "--frozen-lockfile" |
| 23 | + - name: Forge numeric Nightly version |
| 24 | + id: version |
| 25 | + env: |
| 26 | + RUN_NUMBER: ${{ github.run_number }} |
| 27 | + run: echo "number=$(( 5500 + ${RUN_NUMBER} ))" >> $GITHUB_OUTPUT |
| 28 | + - name: Patch package.json version |
| 29 | + env: |
| 30 | + VERSION_NUMBER: ${{ steps.version.outputs.number }} |
| 31 | + run: | |
| 32 | + node <<'EOF' |
| 33 | + const fs = require('fs'); |
| 34 | + const path = require('path'); |
| 35 | + const pkgPath = path.join(__dirname, 'apps', 'vscode-nightly', 'package.nightly.json'); |
| 36 | + const pkg = JSON.parse(fs.readFileSync(pkgPath,'utf8')); |
| 37 | + const [maj, min] = pkg.version.split('.'); |
| 38 | + pkg.version = `${maj}.${min}.${process.env.VERSION_NUMBER}`; |
| 39 | + fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2)); |
| 40 | + console.log(`🔖 Nightly version set to ${pkg.version}`); |
| 41 | + EOF |
| 42 | + - name: Build VSIX |
| 43 | + run: pnpm vsix:nightly # Produces bin/roo-code-nightly-0.0.[count].vsix |
| 44 | + - name: Publish to VS Code Marketplace |
| 45 | + env: |
| 46 | + VSCE_PAT: ${{ secrets.VSCE_PAT }} |
| 47 | + run: npx vsce publish --packagePath "bin/$(/bin/ls bin | head -n1)" |
| 48 | + - name: Publish to Open VSX Registry |
| 49 | + env: |
| 50 | + OVSX_PAT: ${{ secrets.OVSX_PAT }} |
| 51 | + run: npx ovsx publish "bin/$(ls bin | head -n1)" |
0 commit comments