mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
chore: fix RELEASE_TAG fallback in workflow
This commit is contained in:
22
.github/workflows/release-sdk.yml
vendored
22
.github/workflows/release-sdk.yml
vendored
@@ -39,8 +39,7 @@ jobs:
|
|||||||
environment:
|
environment:
|
||||||
name: 'production-release'
|
name: 'production-release'
|
||||||
url: '${{ github.server_url }}/${{ github.repository }}/releases/tag/sdk-typescript-${{ steps.version.outputs.RELEASE_TAG }}'
|
url: '${{ github.server_url }}/${{ github.repository }}/releases/tag/sdk-typescript-${{ steps.version.outputs.RELEASE_TAG }}'
|
||||||
if: |-
|
if: github.repository == 'QwenLM/qwen-code'
|
||||||
${{ github.repository == 'QwenLM/qwen-code' }}
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: 'write'
|
contents: 'write'
|
||||||
packages: 'write'
|
packages: 'write'
|
||||||
@@ -60,19 +59,17 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CREATE_NIGHTLY_RELEASE: '${{ github.event.inputs.create_nightly_release }}'
|
CREATE_NIGHTLY_RELEASE: '${{ github.event.inputs.create_nightly_release }}'
|
||||||
CREATE_PREVIEW_RELEASE: '${{ github.event.inputs.create_preview_release }}'
|
CREATE_PREVIEW_RELEASE: '${{ github.event.inputs.create_preview_release }}'
|
||||||
EVENT_NAME: '${{ github.event_name }}'
|
|
||||||
CRON: '${{ github.event.schedule }}'
|
|
||||||
DRY_RUN_INPUT: '${{ github.event.inputs.dry_run }}'
|
DRY_RUN_INPUT: '${{ github.event.inputs.dry_run }}'
|
||||||
id: 'vars'
|
id: 'vars'
|
||||||
run: |-
|
run: |-
|
||||||
is_nightly="false"
|
is_nightly="false"
|
||||||
if [[ "${CRON}" == "0 1 * * *" || "${CREATE_NIGHTLY_RELEASE}" == "true" ]]; then
|
if [[ "${CREATE_NIGHTLY_RELEASE}" == "true" ]]; then
|
||||||
is_nightly="true"
|
is_nightly="true"
|
||||||
fi
|
fi
|
||||||
echo "is_nightly=${is_nightly}" >> "${GITHUB_OUTPUT}"
|
echo "is_nightly=${is_nightly}" >> "${GITHUB_OUTPUT}"
|
||||||
|
|
||||||
is_preview="false"
|
is_preview="false"
|
||||||
if [[ "${CRON}" == "59 0 * * 3" || "${CREATE_PREVIEW_RELEASE}" == "true" ]]; then
|
if [[ "${CREATE_PREVIEW_RELEASE}" == "true" ]]; then
|
||||||
is_preview="true"
|
is_preview="true"
|
||||||
fi
|
fi
|
||||||
echo "is_preview=${is_preview}" >> "${GITHUB_OUTPUT}"
|
echo "is_preview=${is_preview}" >> "${GITHUB_OUTPUT}"
|
||||||
@@ -124,8 +121,7 @@ jobs:
|
|||||||
MANUAL_VERSION: '${{ inputs.version }}'
|
MANUAL_VERSION: '${{ inputs.version }}'
|
||||||
|
|
||||||
- name: 'Run Tests'
|
- name: 'Run Tests'
|
||||||
if: |-
|
if: github.event.inputs.force_skip_tests != 'true'
|
||||||
${{ github.event.inputs.force_skip_tests != 'true' }}
|
|
||||||
working-directory: 'packages/sdk-typescript'
|
working-directory: 'packages/sdk-typescript'
|
||||||
run: |
|
run: |
|
||||||
npm run test:ci
|
npm run test:ci
|
||||||
@@ -182,7 +178,7 @@ jobs:
|
|||||||
- name: 'Configure npm for publishing'
|
- name: 'Configure npm for publishing'
|
||||||
uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions/setup-node@v4
|
uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # ratchet:actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version-file: '.nvmrc'
|
||||||
registry-url: 'https://registry.npmjs.org'
|
registry-url: 'https://registry.npmjs.org'
|
||||||
scope: '@qwen-code'
|
scope: '@qwen-code'
|
||||||
|
|
||||||
@@ -194,8 +190,7 @@ jobs:
|
|||||||
NODE_AUTH_TOKEN: '${{ secrets.NPM_TOKEN }}'
|
NODE_AUTH_TOKEN: '${{ secrets.NPM_TOKEN }}'
|
||||||
|
|
||||||
- name: 'Create GitHub Release and Tag'
|
- name: 'Create GitHub Release and Tag'
|
||||||
if: |-
|
if: steps.vars.outputs.is_dry_run == 'false'
|
||||||
${{ steps.vars.outputs.is_dry_run == 'false' }}
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
RELEASE_BRANCH: '${{ steps.release_branch.outputs.BRANCH_NAME }}'
|
RELEASE_BRANCH: '${{ steps.release_branch.outputs.BRANCH_NAME }}'
|
||||||
@@ -209,11 +204,10 @@ jobs:
|
|||||||
--generate-notes
|
--generate-notes
|
||||||
|
|
||||||
- name: 'Create Issue on Failure'
|
- name: 'Create Issue on Failure'
|
||||||
if: |-
|
if: failure()
|
||||||
${{ failure() }}
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
RELEASE_TAG: '${{ steps.version.outputs.RELEASE_TAG }} || "N/A"'
|
RELEASE_TAG: "${{ steps.version.outputs.RELEASE_TAG || 'N/A' }}"
|
||||||
DETAILS_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
|
DETAILS_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
|
||||||
run: |-
|
run: |-
|
||||||
gh issue create \
|
gh issue create \
|
||||||
|
|||||||
Reference in New Issue
Block a user