Skip to content

Commit 0ca73ab

Browse files
committed
Actually write summary
1 parent ed41118 commit 0ca73ab

File tree

4 files changed

+32
-11
lines changed

4 files changed

+32
-11
lines changed

badges/coverage.svg

Lines changed: 1 addition & 1 deletion
Loading

dist/index.js

Lines changed: 18 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import * as core from '@actions/core'
22
import { promises as fs } from 'fs'
33
import { jsonFromSpec } from './luaspec'
44
import { createOrUpdateExtension, PluginMetaData } from './extensionstore'
5+
import { env } from 'process'
56

67
// Import fs
78

@@ -35,12 +36,17 @@ export async function run(): Promise<void> {
3536

3637
await createOrUpdateExtension(downloadUrl, metaData, api, token, publish)
3738

38-
core.summary
39-
.addHeading('Extension created or updated')
40-
.addLink(
41-
'Check API',
42-
`${api}/api/v1/plugins/${metaData.VendorId}.${metaData.Id}/versions`
43-
)
39+
if (env.GITHUB_STEP_SUMMARY) {
40+
core.summary
41+
.addHeading('Extension created or updated')
42+
.addLink(
43+
'Check API',
44+
`${api}/api/v1/plugins/${metaData.VendorId}.${metaData.Id}/versions`
45+
)
46+
.write()
47+
} else {
48+
core.warning('No $GITHUB_STEP_SUMMARY found')
49+
}
4450

4551
//core.setOutput('outputJson', asJson)
4652
} catch (error) {

0 commit comments

Comments
 (0)