Skip to content

Commit 5accb23

Browse files
zwaitttlzw1926
andauthored
feat: expose published outputs as env variables (un-ts#118)
Co-authored-by: zhenwu.li <zhenwu.li@pixocial.com>
1 parent 64f8810 commit 5accb23

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/eleven-geese-rest.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'changesets-gitlab': patch
3+
---
4+
5+
expose published outputs as env variables to be accessed dicrectly in `PUBLISHED` command process

src/main.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { URL } from 'node:url'
22

3-
import { getInput, setFailed, setOutput } from '@actions/core'
3+
import { getInput, setFailed, setOutput, exportVariable } from '@actions/core'
44
import { exec } from '@actions/exec'
55
import fs from 'fs-extra'
66

@@ -95,6 +95,8 @@ MainCommandOptions = {}) => {
9595
if (result.published) {
9696
setOutput('published', true)
9797
setOutput('publishedPackages', result.publishedPackages)
98+
exportVariable('PUBLISHED', true)
99+
exportVariable('PUBLISHED_PACKAGES', result.publishedPackages)
98100
if (published) {
99101
execSync(published)
100102
}

0 commit comments

Comments
 (0)