chore: fix lint errors for shell scripts and yaml files

This commit is contained in:
tanzhenxin
2025-08-22 11:35:35 +08:00
parent 0ba0d27941
commit 0f3db5275f
11 changed files with 195 additions and 213 deletions

View File

@@ -1,69 +1,69 @@
# .aoneci/workflows/ci.yml
name: Qwen Code CI
name: 'Qwen Code CI'
triggers:
push:
branches: [main, dev, integration]
branches: ['main', 'dev', 'integration']
merge_request:
jobs:
build:
name: Build and Lint
name: 'Build and Lint'
steps:
- uses: checkout
- uses: setup-env
- uses: 'checkout'
- uses: 'setup-env'
inputs:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: 'Install dependencies'
run: 'npm ci'
- name: Run formatter check
- name: 'Run formatter check'
run: |
npm run format
git diff --exit-code
- name: Run linter
run: npm run lint:ci
- name: 'Run linter'
run: 'npm run lint:ci'
- name: Build project
run: npm run build
- name: 'Build project'
run: 'npm run build'
- name: Run type check
run: npm run typecheck
- name: 'Run type check'
run: 'npm run typecheck'
- name: Upload build artifacts
uses: upload-artifact
- name: 'Upload build artifacts'
uses: 'upload-artifact'
inputs:
name: build-artifacts-20
name: 'build-artifacts-20'
path: |
packages/*/dist/**/*
package-lock.json
test:
name: Test
needs: build # This job depends on the 'build' job
name: 'Test'
needs: 'build' # This job depends on the 'build' job
steps:
- uses: checkout
- uses: 'checkout'
- uses: setup-env
- uses: 'setup-env'
inputs:
node-version: '20'
- uses: download-artifact
- uses: 'download-artifact'
inputs:
name: build-artifacts-20
path: .
name: 'build-artifacts-20'
path: '.'
- name: Install dependencies for testing
run: npm ci
- name: 'Install dependencies for testing'
run: 'npm ci'
- name: Run tests and generate reports
run: NO_COLOR=true npm run test:ci
- name: 'Run tests and generate reports'
run: 'NO_COLOR=true npm run test:ci'
- name: Upload coverage reports
uses: upload-artifact
- name: 'Upload coverage reports'
uses: 'upload-artifact'
inputs:
name: coverage-reports-20
path: packages/*/coverage
name: 'coverage-reports-20'
path: 'packages/*/coverage'

View File

@@ -1,5 +1,5 @@
name: Bug Report
description: Report a bug to help us improve Qwen Code
name: 'Bug Report'
description: 'Report a bug to help us improve Qwen Code'
labels: ['kind/bug', 'status/need-triage']
body:
- type: 'markdown'
@@ -28,8 +28,8 @@ body:
- type: 'textarea'
id: 'info'
attributes:
label: Client information
description: Please paste the full text from the `/about` command run from Qwen Code. Also include which platform (macOS, Windows, Linux).
label: 'Client information'
description: 'Please paste the full text from the `/about` command run from Qwen Code. Also include which platform (macOS, Windows, Linux).'
value: |
<details>
@@ -45,8 +45,8 @@ body:
- type: 'textarea'
id: 'login-info'
attributes:
label: Login information
description: Describe how you are logging in (e.g., API Config).
label: 'Login information'
description: 'Describe how you are logging in (e.g., API Config).'
- type: 'textarea'
id: 'additional-context'

View File

@@ -1,4 +1,4 @@
name: Build and Publish Docker Image
name: 'Build and Publish Docker Image'
on:
push:
@@ -8,35 +8,35 @@ on:
inputs:
publish:
description: 'Publish to GHCR (only works on main branch)'
type: boolean
type: 'boolean'
default: false
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
REGISTRY: 'ghcr.io'
IMAGE_NAME: '${{ github.repository }}'
jobs:
build-and-push-to-ghcr:
runs-on: ubuntu-latest
runs-on: 'ubuntu-latest'
permissions:
contents: read
packages: write
contents: 'read'
packages: 'write'
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: 'Checkout repository'
uses: 'actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683' # v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: 'Set up QEMU'
uses: 'docker/setup-qemu-action@v3'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: 'Set up Docker Buildx'
uses: 'docker/setup-buildx-action@v3'
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
- name: 'Extract metadata (tags, labels) for Docker'
id: 'meta'
uses: 'docker/metadata-action@v5'
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}'
tags: |
type=ref,event=branch
type=ref,event=pr
@@ -44,22 +44,22 @@ jobs:
type=semver,pattern={{major}}.{{minor}}
type=sha,prefix=sha-,format=short
- name: Log in to the Container registry
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
uses: docker/login-action@v3
- name: 'Log in to the Container registry'
if: 'github.event_name != "pull_request" && (github.ref == "refs/heads/main" || startsWith(github.ref, "refs/tags/v"))'
uses: 'docker/login-action@v3'
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: '${{ env.REGISTRY }}'
username: '${{ github.actor }}'
password: '${{ secrets.GITHUB_TOKEN }}'
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v6
- name: 'Build and push Docker image'
id: 'build-and-push'
uses: 'docker/build-push-action@v6'
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || github.event.inputs.publish == 'true') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
context: '.'
platforms: 'linux/amd64,linux/arm64'
push: '${{ github.event_name != "pull_request" && (github.ref == "refs/heads/main" || startsWith(github.ref, "refs/tags/v") || github.event.inputs.publish == "true") }}'
tags: '${{ steps.meta.outputs.tags }}'
labels: '${{ steps.meta.outputs.labels }}'
build-args: |
CLI_VERSION_ARG=${{ github.sha }}

View File

@@ -1,6 +1,6 @@
# .github/workflows/ci.yml
name: Qwen Code CI
name: 'Qwen Code CI'
on:
push:

View File

@@ -54,8 +54,8 @@ jobs:
- name: 'Run E2E tests'
env:
OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}'
OPENAI_BASE_URL: ${{ secrets.OPENAI_BASE_URL }}
OPENAI_MODEL: ${{ secrets.OPENAI_MODEL }}
OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}'
OPENAI_MODEL: '${{ secrets.OPENAI_MODEL }}'
KEEP_OUTPUT: 'true'
SANDBOX: '${{ matrix.sandbox }}'
VERBOSE: 'true'
@@ -85,7 +85,7 @@ jobs:
- name: 'Run E2E tests'
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_BASE_URL: ${{ secrets.OPENAI_BASE_URL }}
OPENAI_MODEL: ${{ secrets.OPENAI_MODEL }}
run: npm run test:e2e
OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}'
OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}'
OPENAI_MODEL: '${{ secrets.OPENAI_MODEL }}'
run: 'npm run test:e2e'

View File

@@ -1,4 +1,4 @@
name: Qwen Automated Issue Triage
name: 'Qwen Automated Issue Triage'
on:
issues:
@@ -33,19 +33,20 @@ permissions:
jobs:
triage-issue:
timeout-minutes: 5
if: ${{ github.repository == 'QwenLM/qwen-code' }}
runs-on: ubuntu-latest
if: '${{ github.repository == "QwenLM/qwen-code" }}'
runs-on: 'ubuntu-latest'
steps:
- name: Run Qwen Issue Triage
uses: QwenLM/qwen-code-action@5fd6818d04d64e87d255ee4d5f77995e32fbf4c2
- name: 'Run Qwen Issue Analysis'
uses: 'QwenLM/qwen-code-action@5fd6818d04d64e87d255ee4d5f77995e32fbf4c2'
id: 'qwen_issue_analysis'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_BODY: ${{ github.event.issue.body }}
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
ISSUE_TITLE: '${{ github.event.issue.title }}'
ISSUE_BODY: '${{ github.event.issue.body }}'
with:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_BASE_URL: ${{ secrets.OPENAI_BASE_URL }}
OPENAI_MODEL: ${{ secrets.OPENAI_MODEL }}
OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}'
OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}'
OPENAI_MODEL: '${{ secrets.OPENAI_MODEL }}'
settings_json: |
{
"maxSessionTurns": 25,
@@ -65,11 +66,11 @@ jobs:
## Steps
1. Run: `gh label list --repo "${REPOSITORY}" --limit 100` to get all available labels.
1. Run: `gh label list --repo ${{ github.repository }} --limit 100` to get all available labels.
2. Use right tool to review the issue title and body provided in the environment variables: "${ISSUE_TITLE}" and "${ISSUE_BODY}".
3. Ignore any existing priorities or tags on the issue. Just report your findings.
4. Select the most relevant labels from the existing labels, focusing on kind/*, area/*, sub-area/* and priority/*. For area/* and kind/* limit yourself to only the single most applicable label in each case.
6. Apply the selected labels to this issue using: `gh issue edit "${ISSUE_NUMBER}" --repo "${REPOSITORY}" --add-label "label1,label2"`.
6. Apply the selected labels to this issue using: `gh issue edit ${{ github.event.issue.number }} --repo ${{ github.repository }} --add-label "label1,label2"`.
7. For each issue please check if CLI version is present, this is usually in the output of the /about command and will look like 0.1.5 for anything more than 6 versions older than the most recent should add the status/need-retesting label.
8. If you see that the issue doesn't look like it has sufficient information recommend the status/need-information label.
9. Use Area definitions mentioned below to help you narrow down issues.
@@ -160,19 +161,20 @@ jobs:
- other general software performance like, memory usage, CPU consumption, and algorithmic efficiency.
- Switching models from one to the other unexpectedly.
- name: 'Post Issue Triage Failure Comment'
- name: 'Post Issue Analysis Failure Comment'
if: |-
${{ failure() && steps.gemini_issue_triage.outcome == 'failure' }}
${{ failure() && steps.qwen_issue_analysis.outcome == 'failure' }}
uses: 'actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea' # ratchet:actions/github-script@v7
env:
ISSUE_NUMBER: '${{ github.event.issue.number }}'
REPOSITORY: '${{ github.repository }}'
RUN_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
with:
github-token: '${{ steps.generate_token.outputs.token }}'
github-token: '${{ secrets.GITHUB_TOKEN }}'
script: |-
github.rest.issues.createComment({
owner: process.env.REPOSITORY.split('/')[0],
repo: process.env.REPOSITORY.split('/')[1],
issue_number: '${{ github.event.issue.number }}',
body: 'There is a problem with the Qwen Code issue triaging. Please check the [action logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for details.'
issue_number: parseInt(process.env.ISSUE_NUMBER),
body: 'There is a problem with the Qwen Code issue analysis. Please check the [action logs](${process.env.RUN_URL}) for details.'
})

View File

@@ -1,4 +1,4 @@
name: Qwen Scheduled Issue Triage
name: 'Qwen Scheduled Issue Triage'
on:
schedule:
@@ -23,17 +23,18 @@ permissions:
jobs:
triage-issues:
timeout-minutes: 10
if: ${{ github.repository == 'QwenLM/qwen-code' }}
runs-on: ubuntu-latest
if: '${{ github.repository == "QwenLM/qwen-code" }}'
runs-on: 'ubuntu-latest'
permissions:
contents: read
id-token: write
issues: write
contents: 'read'
id-token: 'write'
issues: 'write'
steps:
- name: Find untriaged issues
id: find_issues
- name: 'Find untriaged issues'
id: 'find_issues'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
GITHUB_REPOSITORY: '${{ github.repository }}'
run: |
echo "🔍 Finding issues without labels..."
NO_LABEL_ISSUES=$(gh issue list --repo ${{ github.repository }} --search "is:open is:issue no:label" --json number,title,body)
@@ -52,17 +53,17 @@ jobs:
echo '📝 Setting output for GitHub Actions...'
echo "issues_to_triage=${ISSUES}" >> "${GITHUB_OUTPUT}"
- name: Run Qwen Issue Triage
if: steps.find_issues.outputs.issues_to_triage != '[]'
uses: QwenLM/qwen-code-action@5fd6818d04d64e87d255ee4d5f77995e32fbf4c2
- name: 'Run Qwen Issue Triage'
if: 'steps.find_issues.outputs.issues_to_triage != "[]"'
uses: 'QwenLM/qwen-code-action@5fd6818d04d64e87d255ee4d5f77995e32fbf4c2'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUES_TO_TRIAGE: ${{ steps.find_issues.outputs.issues_to_triage }}
REPOSITORY: ${{ github.repository }}
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
ISSUES_TO_TRIAGE: '${{ steps.find_issues.outputs.issues_to_triage }}'
REPOSITORY: '${{ github.repository }}'
with:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_BASE_URL: ${{ secrets.OPENAI_BASE_URL }}
OPENAI_MODEL: ${{ secrets.OPENAI_MODEL }}
OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}'
OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}'
OPENAI_MODEL: '${{ secrets.OPENAI_MODEL }}'
settings_json: |
{
"maxSessionTurns": 25,
@@ -84,28 +85,28 @@ jobs:
## Steps
1. Run: `gh label list --repo "${REPOSITORY}" --limit 100` to get all available labels.
1. Run: `gh label list --repo ${{ github.repository }} --limit 100` to get all available labels.
2. Use right tool to check environment variable for issues to triage: $ISSUES_TO_TRIAGE (JSON array of issues)
3. Review the issue title, body and any comments provided in the environment variables.
4. Ignore any existing priorities or tags on the issue.
5. Select the most relevant labels from the existing labels, focusing on kind/*, area/*, sub-area/* and priority/*.
6. Get the list of labels already on the issue using `gh issue view ISSUE_NUMBER --repo "${REPOSITORY}" --json labels -t '{{range .labels}}{{.name}}{{"\n"}}{{end}}'
6. Get the list of labels already on the issue using `gh issue view ISSUE_NUMBER --repo ${{ github.repository }} --json labels -t '{{range .labels}}{{.name}}{{"\n"}}{{end}}'
7. For area/* and kind/* limit yourself to only the single most applicable label in each case.
8. Give me a single short paragraph about why you are selecting each label in the process. use the format Issue ID: , Title, Label applied:, Label removed, ovearll explanation
9. Parse the JSON array from step 2 and for EACH INDIVIDUAL issue, apply appropriate labels using separate commands:
- `gh issue edit ISSUE_NUMBER --repo "${REPOSITORY}" --add-label "label1"`
- `gh issue edit ISSUE_NUMBER --repo "${REPOSITORY}" --add-label "label2"`
- `gh issue edit ISSUE_NUMBER --repo ${{ github.repository }} --add-label "label1"`
- `gh issue edit ISSUE_NUMBER --repo ${{ github.repository }} --add-label "label2"`
- Continue for each label separately
- IMPORTANT: Label each issue individually, one command per issue, one label at a time if needed.
- Make sure after you apply labels there is only one area/* and one kind/* label per issue.
- To do this look for labels found in step 6 that no longer apply remove them one at a time using
- `gh issue edit ISSUE_NUMBER --repo "${REPOSITORY}" --remove-label "label-name1"`
- `gh issue edit ISSUE_NUMBER --repo "${REPOSITORY}" --remove-label "label-name2"`
- `gh issue edit ISSUE_NUMBER --repo ${{ github.repository }} --remove-label "label-name1"`
- `gh issue edit ISSUE_NUMBER --repo ${{ github.repository }} --remove-label "label-name2"`
- IMPORTANT: Remove each label one at a time, one command per issue if needed.
10. For each issue please check if CLI version is present, this is usually in the output of the /about command and will look like 0.1.5
- Anything more than 6 versions older than the most recent should add the status/need-retesting label
11. If you see that the issue doesn't look like it has sufficient information recommend the status/need-information label
- After applying appropriate labels to an issue, remove the "status/need-triage" label if present: `gh issue edit ISSUE_NUMBER --repo "${REPOSITORY}" --remove-label "status/need-triage"`
- After applying appropriate labels to an issue, remove the "status/need-triage" label if present: `gh issue edit ISSUE_NUMBER --repo ${{ github.repository }} --remove-label "status/need-triage"`
- Execute one `gh issue edit` command per issue, wait for success before proceeding to the next
Process each issue sequentially and confirm each labeling operation before moving to the next issue.

View File

@@ -1,4 +1,4 @@
name: Qwen Scheduled PR Triage 🚀
name: 'Qwen Scheduled PR Triage 🚀'
on:
schedule:
@@ -8,7 +8,7 @@ on:
jobs:
audit-prs:
timeout-minutes: 15
if: ${{ github.repository == 'QwenLM/qwen-code' }}
if: '${{ github.repository == "QwenLM/qwen-code" }}'
permissions:
contents: 'read'
id-token: 'write'
@@ -21,9 +21,9 @@ jobs:
- name: 'Checkout'
uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5
- name: Run PR Triage Script
id: run_triage
- name: 'Run PR Triage Script'
id: 'run_triage'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: ./.github/scripts/pr-triage.sh
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
GITHUB_REPOSITORY: '${{ github.repository }}'
run: './.github/scripts/pr-triage.sh'

View File

@@ -1,24 +1,24 @@
name: 🧐 Qwen Pull Request Review
name: '🧐 Qwen Pull Request Review'
on:
pull_request_target:
types: [opened]
types: ['opened']
pull_request_review_comment:
types: [created]
types: ['created']
pull_request_review:
types: [submitted]
types: ['submitted']
workflow_dispatch:
inputs:
pr_number:
description: 'PR number to review'
required: true
type: number
type: 'number'
jobs:
review-pr:
if: >
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request_target' &&
(github.event_name == 'pull_request_target' &&
github.event.action == 'opened' &&
(github.event.pull_request.author_association == 'OWNER' ||
github.event.pull_request.author_association == 'MEMBER' ||
@@ -40,24 +40,24 @@ jobs:
github.event.review.author_association == 'MEMBER' ||
github.event.review.author_association == 'COLLABORATOR'))
timeout-minutes: 15
runs-on: ubuntu-latest
runs-on: 'ubuntu-latest'
permissions:
contents: read
id-token: write
pull-requests: write
issues: write
contents: 'read'
id-token: 'write'
pull-requests: 'write'
issues: 'write'
steps:
- name: Checkout PR code
uses: actions/checkout@v4
- name: 'Checkout PR code'
uses: 'actions/checkout@v4'
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: '${{ secrets.GITHUB_TOKEN }}'
fetch-depth: 0
- name: Get PR details (pull_request_target & workflow_dispatch)
id: get_pr
if: github.event_name == 'pull_request_target' || github.event_name == 'workflow_dispatch'
- name: 'Get PR details (pull_request_target & workflow_dispatch)'
id: 'get_pr'
if: 'github.event_name == "pull_request_target" || github.event_name == "workflow_dispatch"'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
PR_NUMBER=${{ github.event.inputs.pr_number }}
@@ -74,12 +74,12 @@ jobs:
echo "$CHANGED_FILES" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
- name: Get PR details (issue_comment)
id: get_pr_comment
if: github.event_name == 'issue_comment'
- name: 'Get PR details (issue_comment)'
id: 'get_pr_comment'
if: 'github.event_name == "issue_comment"'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMENT_BODY: ${{ github.event.comment.body }}
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
COMMENT_BODY: '${{ github.event.comment.body }}'
run: |
PR_NUMBER=${{ github.event.issue.number }}
echo "pr_number=$PR_NUMBER" >> "$GITHUB_OUTPUT"
@@ -95,19 +95,19 @@ jobs:
echo "$CHANGED_FILES" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
- name: Run Qwen PR Review
uses: QwenLM/qwen-code-action@5fd6818d04d64e87d255ee4d5f77995e32fbf4c2
- name: 'Run Qwen PR Review'
uses: 'QwenLM/qwen-code-action@5fd6818d04d64e87d255ee4d5f77995e32fbf4c2'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ steps.get_pr.outputs.pr_number || steps.get_pr_comment.outputs.pr_number }}
PR_DATA: ${{ steps.get_pr.outputs.pr_data || steps.get_pr_comment.outputs.pr_data }}
CHANGED_FILES: ${{ steps.get_pr.outputs.changed_files || steps.get_pr_comment.outputs.changed_files }}
ADDITIONAL_INSTRUCTIONS: ${{ steps.get_pr.outputs.additional_instructions || steps.get_pr_comment.outputs.additional_instructions }}
REPOSITORY: ${{ github.repository }}
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
PR_NUMBER: '${{ steps.get_pr.outputs.pr_number || steps.get_pr_comment.outputs.pr_number }}'
PR_DATA: '${{ steps.get_pr.outputs.pr_data || steps.get_pr_comment.outputs.pr_data }}'
CHANGED_FILES: '${{ steps.get_pr.outputs.changed_files || steps.get_pr_comment.outputs.changed_files }}'
ADDITIONAL_INSTRUCTIONS: '${{ steps.get_pr.outputs.additional_instructions || steps.get_pr_comment.outputs.additional_instructions }}'
REPOSITORY: '${{ github.repository }}'
with:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_BASE_URL: ${{ secrets.OPENAI_BASE_URL }}
OPENAI_MODEL: ${{ secrets.OPENAI_MODEL }}
OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}'
OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}'
OPENAI_MODEL: '${{ secrets.OPENAI_MODEL }}'
settings_json: |
{
"coreTools": [

View File

@@ -35,9 +35,9 @@ jobs:
release:
runs-on: 'ubuntu-latest'
environment:
name: production-release
url: ${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ steps.version.outputs.RELEASE_TAG }}
if: github.repository == 'QwenLM/qwen-code'
name: 'production-release'
url: '${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ steps.version.outputs.RELEASE_TAG }}'
if: 'github.repository == "QwenLM/qwen-code"'
permissions:
contents: 'write'
packages: 'write'
@@ -82,34 +82,34 @@ jobs:
run: |-
npm ci
- name: Get the version
id: version
- name: 'Get the version'
id: 'version'
run: |
VERSION_JSON=$(node scripts/get-release-version.js)
echo "RELEASE_TAG=$(echo $VERSION_JSON | jq -r .releaseTag)" >> $GITHUB_OUTPUT
echo "RELEASE_VERSION=$(echo $VERSION_JSON | jq -r .releaseVersion)" >> $GITHUB_OUTPUT
echo "NPM_TAG=$(echo $VERSION_JSON | jq -r .npmTag)" >> $GITHUB_OUTPUT
echo "RELEASE_TAG=$(echo "$VERSION_JSON" | jq -r .releaseTag)" >> "$GITHUB_OUTPUT"
echo "RELEASE_VERSION=$(echo "$VERSION_JSON" | jq -r .releaseVersion)" >> "$GITHUB_OUTPUT"
echo "NPM_TAG=$(echo "$VERSION_JSON" | jq -r .npmTag)" >> "$GITHUB_OUTPUT"
# Get the previous tag for release notes generation
CURRENT_TAG=$(echo $VERSION_JSON | jq -r .releaseTag)
CURRENT_TAG=$(echo "$VERSION_JSON" | jq -r .releaseTag)
PREVIOUS_TAG=$(node scripts/get-previous-tag.js "$CURRENT_TAG" || echo "")
echo "PREVIOUS_TAG=${PREVIOUS_TAG}" >> $GITHUB_OUTPUT
echo "PREVIOUS_TAG=${PREVIOUS_TAG}" >> "$GITHUB_OUTPUT"
env:
IS_NIGHTLY: ${{ steps.vars.outputs.is_nightly }}
MANUAL_VERSION: ${{ inputs.version }}
IS_NIGHTLY: '${{ steps.vars.outputs.is_nightly }}'
MANUAL_VERSION: '${{ inputs.version }}'
- name: Run Tests
if: github.event.inputs.force_skip_tests != 'true'
- name: 'Run Tests'
if: 'github.event.inputs.force_skip_tests != "true"'
run: |
npm run preflight
npm run test:integration:sandbox:none
npm run test:integration:sandbox:docker
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_BASE_URL: ${{ secrets.OPENAI_BASE_URL }}
OPENAI_MODEL: ${{ secrets.OPENAI_MODEL }}
OPENAI_API_KEY: '${{ secrets.OPENAI_API_KEY }}'
OPENAI_BASE_URL: '${{ secrets.OPENAI_BASE_URL }}'
OPENAI_MODEL: '${{ secrets.OPENAI_MODEL }}'
- name: Configure Git User
- name: 'Configure Git User'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
@@ -156,25 +156,25 @@ jobs:
registry-url: 'https://registry.npmjs.org'
scope: '@qwen-code'
- name: Publish @qwen-code/qwen-code-core
run: npm publish --workspace=@qwen-code/qwen-code-core --access public --tag=${{ steps.version.outputs.NPM_TAG }} ${{ steps.vars.outputs.is_dry_run == 'true' && '--dry-run' || '' }}
- name: 'Publish @qwen-code/qwen-code-core'
run: 'npm publish --workspace=@qwen-code/qwen-code-core --access public --tag=${{ steps.version.outputs.NPM_TAG }} ${{ steps.vars.outputs.is_dry_run == "true" && "--dry-run" || "" }}'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: '${{ secrets.NPM_TOKEN }}'
- name: Install latest core package
if: steps.vars.outputs.is_dry_run == 'false'
run: npm install @qwen-code/qwen-code-core@${{ steps.version.outputs.RELEASE_VERSION }} --workspace=@qwen-code/qwen-code --save-exact
- name: 'Install latest core package'
if: 'steps.vars.outputs.is_dry_run == "false"'
run: 'npm install @qwen-code/qwen-code-core@${{ steps.version.outputs.RELEASE_VERSION }} --workspace=@qwen-code/qwen-code --save-exact'
- name: Publish @qwen-code/qwen-code
run: npm publish --workspace=@qwen-code/qwen-code --access public --tag=${{ steps.version.outputs.NPM_TAG }} ${{ steps.vars.outputs.is_dry_run == 'true' && '--dry-run' || '' }}
- name: 'Publish @qwen-code/qwen-code'
run: 'npm publish --workspace=@qwen-code/qwen-code --access public --tag=${{ steps.version.outputs.NPM_TAG }} ${{ steps.vars.outputs.is_dry_run == "true" && "--dry-run" || "" }}'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: '${{ secrets.NPM_TOKEN }}'
- name: Create GitHub Release and Tag
if: ${{ steps.vars.outputs.is_dry_run == 'false' }}
- name: 'Create GitHub Release and Tag'
if: '${{ steps.vars.outputs.is_dry_run == "false" }}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_BRANCH: ${{ steps.release_branch.outputs.BRANCH_NAME }}
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
RELEASE_BRANCH: '${{ steps.release_branch.outputs.BRANCH_NAME }}'
run: |
# Build the gh release create command with appropriate options
RELEASE_CMD="gh release create ${{ steps.version.outputs.RELEASE_TAG }} bundle/gemini.js --target \"$RELEASE_BRANCH\" --title \"Release ${{ steps.version.outputs.RELEASE_TAG }}\""
@@ -189,7 +189,7 @@ jobs:
fi
# Execute the release command
eval $RELEASE_CMD
eval "$RELEASE_CMD"
- name: 'Create Issue on Failure'
if: |-

View File

@@ -1,21 +0,0 @@
#!/bin/bash
# Build the packages first
npm run build:packages
# Pack CLI package
cd packages/cli && npm pack && cd ../../
# Pack Core package
cd packages/core && npm pack && cd ../../
# Move the tgz files to root directory using absolute paths
cp packages/cli/*.tgz ./
cp packages/core/*.tgz ./
# Remove the original files from package directories
rm packages/cli/*.tgz
rm packages/core/*.tgz
echo "Packages created successfully:"
ls -la *.tgz