Skip to content

Commit

Permalink
feat(notify): ARTIFACT_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
Airkro committed Jul 24, 2024
1 parent 947fcb0 commit 9bd1003
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions packages/notify/lib/utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const {
JOB_ID,
npm_package_version = '未知',
PROJECT_WEB_URL,
ARTIFACT_URL,
} = process.env;

function getVersion({ isLatest, version, rc }) {
Expand Down Expand Up @@ -397,6 +398,30 @@ export async function createContent({
},
],
},
...(ARTIFACT_URL
? [
{
type: 'heading',
depth: 3,
children: [
{
type: 'text',
value: '部署地址',
},
],
},
{
type: 'code',
lang: 'bash',
value: `wget ${ARTIFACT_URL}`,
},
{
type: 'code',
lang: 'bash',
value: `curl ${ARTIFACT_URL}`,
},
]
: []),
{
type: 'list',
spread: false,
Expand Down
2 changes: 1 addition & 1 deletion packages/notify/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bring-it/notify",
"version": "0.3.9",
"version": "0.3.10",
"description": "Send releases notifications",
"license": "MIT",
"author": {
Expand Down

0 comments on commit 9bd1003

Please sign in to comment.