mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-29 22:13:34 +03:00
fix(ci): properly detect @tauri-apps/cli release id from covector output (#8004)
This commit is contained in:
parent
f552c1796a
commit
bab05ff607
@ -115,15 +115,13 @@ jobs:
|
||||
repository: tauri-apps/tauri-docs
|
||||
event-type: update-docs
|
||||
|
||||
- name: Get `@tauri-apps/cli` release id
|
||||
id: cliReleaseId
|
||||
- name: Process covector output
|
||||
id: covectorOutput
|
||||
if: |
|
||||
steps.covector.outputs.successfulPublish == 'true' &&
|
||||
contains(steps.covector.outputs.packagesPublished, '@tauri-apps/cli')
|
||||
run: |
|
||||
echo '${{ toJSON(steps.covector.outputs) }}' > output.json
|
||||
id=$(jq '.["-tauri-apps-cli-releaseId"]' < output.json)
|
||||
rm output.json
|
||||
id=$(node .scripts/covector/parse-output.js '${{ toJSON(steps.covector.outputs) }}' "-tauri-apps-cli-releaseId")
|
||||
echo "cliReleaseId=$id" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Trigger `@tauri-apps/cli` publishing workflow
|
||||
@ -135,7 +133,7 @@ jobs:
|
||||
token: ${{ secrets.ORG_TAURI_BOT_PAT }}
|
||||
repository: tauri-apps/tauri
|
||||
event-type: publish-js-cli
|
||||
client-payload: '{"releaseId": "${{ steps.cliReleaseId.outputs.cliReleaseId }}" }'
|
||||
client-payload: '{"releaseId": "${{ steps.covectorOutput.outputs.cliReleaseId }}" }'
|
||||
|
||||
- name: Trigger `tauri-cli` publishing workflow
|
||||
if: |
|
||||
|
11
.scripts/covector/parse-output.js
Normal file
11
.scripts/covector/parse-output.js
Normal file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
const json = process.argv[2]
|
||||
const field = process.argv[3]
|
||||
|
||||
const output = JSON.parse(json)
|
||||
console.log(output[field])
|
Loading…
Reference in New Issue
Block a user