Skip to content

Commit

Permalink
write output to environment file
Browse files Browse the repository at this point in the history
  • Loading branch information
Will authored and Will committed Aug 29, 2023
1 parent 741cfff commit 35f2f93
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,16 @@ func build(args *Args, fs vfs.FS) error {
}

if GithubAction {
fmt.Printf("::set-output name=package::%s\n", info.Target)
path := os.Getenv("GITHUB_OUTPUT")
mode := os.O_APPEND | os.O_WRONLY

file, err := os.OpenFile(path, mode, 0)
if err != nil {
return err
}
defer file.Close()

fmt.Fprintf(file, "package=%s\n", info.Target)
}
}

Expand Down

0 comments on commit 35f2f93

Please sign in to comment.